views:

44

answers:

1

Hi there,

I am seriously at a loss here. The three things that will not change in this project are the fact that we are using the Entity Framework to do our data access, the fact that we want thorough unit testing and that our UI is asp.net. My question is how the hell do you make this work in Asp.net?

E.g. You can use an ObjectDataSource to connect a method to a control, but if this control is a FormView you have all these problems http://vaultofthoughts.net/ProblemsWithObjectDataSource.aspx to deal with and it simply doesn't work.

Furthermore, with grids, you don't get paging or sorting out of the box unless you use an EntityDataSource which basically circumvents your entire application. I can't be the only person who cries at this. What do you do?

Thanks in advance.

+1  A: 

Not sure what your question is here but anyways! Are you having problems with EntityFramework because I know that maintaining the ObjectContext/DataContext can be hard. Usually, with ASP.NET applications you maintain the ObjectContext inside the HttpContext.

For paging and sorting you can create a custom Grid or use any of the third party grids that have paging and sorting functionality.

azamsharp
sorry i rushed the question. do you have any more info or any links to what you meant by maintaining the ObjectContext in the HttpContext?
andrej351
http://dotnetslackers.com/articles/ado_net/managing-entity-framework-objectcontext-lifespan-and-scope-in-n-layered-asp-net-applications.aspx
Craig Stuntz
thank you, very helpful indeed.
andrej351