Search code examples
asp.netdynamic-databusiness-logic-layer

Can ASP.NET Dynamic Data be made to work with custom business objects rather than data objects?


I'm working on a project in which we have a database, data layer (entity framework), business layer and web/UI layer.

I want to use ASP.NET Dynamic Data for the web layer, but don't want it to access the data layer or database, as I want it to be purely running off business logic, and not directly accessing the data.

However, it appears that Dynamic Data only allows Linq-to-SQL or entity framework data sources to be used.

Has anyone used it with business-layer objects instead?

Would this be difficult to implement?


Solution

  • Yay! Looks like it can be used with an existing business layer, via ObjectDataSource.

    http://blogs.msdn.com/davidebb/archive/2008/06/18/using-asp-net-dynamic-data-with-objectdatasource.aspx

    This only works in Dynamic Data 4.0, but I've managed to integrate it into a Visual Studio 2008 project after hacking some references in Web.config.

    Big thanks to the Dynamic Data team!