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.
精彩评论