How is the .net Entity Framework overkill versus LinqToSql?

后端 未结 6 2368
暗喜
暗喜 2021-02-14 15:16

I\'ve heard it said that the Entity Framework is overkill or that it\'s difficult to learn compared to LinqToSql.

I am wondering in what way? I used LinqToSql and like

6条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-14 15:50

    Correct me if I'm wrong, but the entity framework should only come into play when you need to transform the back-end objects, like when you're combining tables from different data sources, splitting tables, etc. It adds the entity layer so you can hide all the plumbing and just deal with your cleaned up entities. If you just use it 1 for 1 against your tables like you would in LINQ to SQL, then I'm sure that layer of complexity that you're not using will slow it down. It sounds like LINQ to SQL is the right tool for the right job in your case until you have more complex data source needs.

提交回复
热议问题