Хабр Курсы для всех
РЕКЛАМА
Практикум, Хекслет, SkyPro, авторские курсы — собрали всех и попросили скидки. Осталось выбрать!
If you want the added security of insulation and loose coupling from the underlying database schema to make your object model more resilient to change, use the Entity Framework
If you find that you need the features of entity inheritance and entity composition, use the Entity Framework
If you already have a large DLINQ codebase (oddly enough, I do) that is running just fine without entities, you probably don't need to spend the time to refactor out DLINQ to replace it with L2E.
If you want to run LINQ queries against an object model, but your object model is a 1:1 mirror of the tables in your database, you probably don't need the EF.
Not included in the chart above, ADO.NET vNext has a powerful «client-views» engine which will only get better with time and is just more incentive for adopting the new stuff.
public abstract class ItemAccessor : DataAccessor<Item> { [SprocName("sp_getItems")] public Item GetItem(string @query); } class Item { public long Id { get; set; } public string Name { get; set; } public string Description { get; set; } }
var itemAccessor = DataAccessor.CreateInstance<ItemAccessor>(); var item = itemAccessor.GetItem("<query><id>12</id><id>13</id></query>");
Linq вцелом
уверенность в том что код будет работать именно так как нужно
она не предполагает наличия никакого дизайнера, а значит 90% всех задачь ее пользователь вынужден писать самостоятельно
Практика использования LinqToSql: Использование Linq для автоматизации вызовов хранимых процедур.