Does LINQ to SQL support POCO?

If I want to work with an object and use LINQ to SQL, what (if anything) do I need to add to my object classes so that my application can talk to the data store? (don't discuss repository templates here, as I'm just looking for what is required inside my business objects)

+3
source share
3 answers

Besides using the LINQ-to-SQL constructor and creating β€œalmost POCO” classes (decorated with a bunch of attributes for matching), you can also use an external XML mapping file (like NHibernate) to achieve the same thing that allows you to maintain the true POCO classes "without any additional attributes or anything else.

See here for more information:

Mark

+7
source

LINQ to SQL () POCO . POCO, [Table].

. MSDN.

FYI: Entity Framework 4 POCO.

+3

Linq to SQL POCO , , , , .

DataContext. Linq to SQL.

Linq to SQL : http://weblogs.asp.net/scottgu/archive/2007/05/19/using-linq-to-sql-part-1.aspx

+1

Source: https://habr.com/ru/post/1717377/


All Articles