Hello, We are considering/evaluating EF for a new ASP.NET project.
Please tell if you are using, or have used, EF v1 on a project ? Please also tell how was your experience with EF in web or desktop application ?
Thank You.
Hello, We are considering/evaluating EF for a new ASP.NET project.
Please tell if you are using, or have used, EF v1 on a project ? Please also tell how was your experience with EF in web or desktop application ?
Thank You.
We used EF for a medium sized internal project. It was a n-tier app with a server containing business logic and a self contained EF layer. The client was a WPF app (connecting to the server via WCF).
There is lots to like about the EF, and it can make some aspects of your DA layer very quick to write, but one thing I will say is that it currently does not have very good support for disconnected applications. It works fantastically if your application is very self contained, has a direct connection to the database and uses 1 data context throughout, the data context manages your data objects, pulls data from and updates the database appropriately.
As soon as you try to disconnect your client in any form of n-tier structure though things get harder. You either have to manage disconnecting and reconnecting your entities from the data contexts or you have to somehow serialize your data context across to the client. You have to use multiple data contexts (partly because our was a stateless server anyway, but also because you'd get in a massive mess trying to use a single data context for multiple clients), and it all becomes a bit trickier to manage. Part of our solution was to have separate "business objects" that were created from the lower level "ef data objects". The EF would then manage these data objects, (persist them and load them from the database etc), but our own BLL layer would manage the business objects. Both saving and loading required translation from the higher level objects to the lower level ones or vice versa.
All in all things have worked OK, but in hindsight I would say that the EF is not fully ready for serious enterprise level development. I have heard that the next version of the EF in .net 4.0 has much better support for disconnected and n-tier apps, but I have not tired this out personally.