Michael,
For example: I would like to request ALL customer's sales between "today" and "tomorrow".
With EF I can do :
using MyEntities context = new MyEntities())
{
var result = from sale in context.Sales
where sale.SaleDate >= DateTime.Now.Today and sale.SaleDate <= DateTime.Now.AddDays(1)
select sale.Customer;
}
Here, EF uses LINQ and "Projection" features.
How do you think to translate it to the "IModel" to turn possible to uses any ORM ?
Even if you create a wrapper class you will have problems :
NETTiers doesn't support LINQ
LLBLGen doesn't support "Projection"
"...A Contact record in the database is exactly the same as if it was created with a generate DAL or any other ORM."
Yes for many ORM but NOT for EF ! It is a big different.
EF uses a concept that we can change the Database Schema without change any generated class OR change the Model Schema without change any database table.
Now, a Contact record can be [1..n] tables in the storage (Oracle, SQL Server, XML, any many others ) and [1..n] Entity Class.
I'm here talking about the problems of creating IModel to accept many ORM.
Please, clarify me if I'm thinking wrong.
,
Alexnaldo Santos