开发者

LINQ-to-SQL classes from a select statement

I am a little new to linq-to-sql. I was just thinking suppose you wanted a subset of fields (in your db table) to actually be a data model in your application,开发者_如何学JAVA what do you do? What I have thought of so far is to create a view from the actual db table and build linq-able classes using it.

Or is there a better way of doing this?


try these Walkthrough: Creating LINQ to SQL Classes (O/R Designer)

or these implemented in MVC Creating Model Classes with LINQ to SQL


One option is you can create Anonymous Types and use it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜