开发者

Upgrading to Entity Framework from Linq to SQL [closed]

开发者 https://www.devze.com 2023-04-12 01:45 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

Although I have been through a number of posts that discuss Linq to SQL and Entity Framework there still exists a lot of confusion at this stage about the following questions.

Before I mention the questions let me say that I have completed a desktop application using Linq to SQL and this usage is based purely on mapping and using SPROCS.

  1. Do I need to upgrade or rewrite my CRUD operations to using Entity Framework? If so what are the advantages that I will have using entity framework over Linq to SQL with SPROCS?

  2. Is Entity framework supported by Visual Studio 2008 / .net framework 3.5?

  3. What are the differences between Entity Framework support in .net 3.5 and 4.0?

These are just a few of the questions that I need some help with before I form a complete picture of the scenario.

If any of you out there have开发者_JAVA技巧 any useful insights that you can provide I would appreciate it

Thanks a ton in advance


  1. No; if your architecture uses stored procedures for all CRUD operations, then you can reuse them with the Entity Framework. Note that EF1 (.NET 3.5) did not support OUTPUT parameters, so you'll want to keep that in mind if that makes a difference to you. Just bear in mind that you lose a lot of the flexibility of an ORM when you constrain it to using stored procedures only.
  2. Yes
  3. They are almost different products. EF1 (.NET 3.5) is regarded by many people (myself included) as not fit for production use. There are a lot of gotchas, not the least of which being the fact that you essentially have to choose between navigation properties and having the actual foreign key value on your entity types. There are workarounds, but they're not pretty.

EF4 is lightyears better than EF1. We're using EF4 in our production system and it works quite well. The specific differences are almost too many to list, but the upshot is that you should strongly consider either upgrading to .NET 4.0 or not using the Entity Framework. EF1 is just that bad.

0

精彩评论

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