This project is read-only.

Linq to SQL or EF

Oct 8, 2009 at 5:49 PM

Okay I am a bit confused as to the design of this project, what does it use Linq to SQL or Entity Framework?

Why is there both in the project? What purpose does using both serve?


Oct 8, 2009 at 9:05 PM

It uses one or the other
it is up to you to choose which one you prefer


Oct 11, 2009 at 12:34 PM

as nachid said, you just need to use one of them and not both.

Why we did this? here is my answer:

  1. LINQ to SQL was made before the release of EF last year. The project started with LINQ to SQL so that is exists
  2. We thought to provide another implementation of the repositories using Entity Framework that will enable us to support multiple database by just building the Database schema and change connection string and use proper .net data provider.
  3. Providing LINQ to SQL & Entity Framework shows the concept of plug & play and decoupling of system components. Using Dependency Injection we almost able to use any implementation of repositories. Who knows, maybe someone would like to implement his/her repositories using NHibernate or any other ORM. Or maybe us classical ADO.NET data access way (Connection, Commands & Readers)

I hope that our answers fulfill your needs