开发者

Dynamic Data and Many to Many Relationships (Display Link to Table)

开发者 https://www.devze.com 2023-03-16 16:33 出处:网络
I need to develop a web site to allow users to perform simple CRUD operations on a database. I thought that instead of implementing everything by myself, using ASP.NET Dynamic Data would be the right

I need to develop a web site to allow users to perform simple CRUD operations on a database. I thought that instead of implementing everything by myself, using ASP.NET Dynamic Data would be the right thing. But there are still a few things which are unclear to me.

First I want to use LINQ to SQL because I never used Entity Framework before and want to offer a solution in a short time frame. I did read that LINQ to SQL is not able to resolve Many to Many Relationships. But it should not be a problem to implement it by yourself if you are using Pure Junction Tables which is the case. So a few additional properties will be added to t开发者_开发知识库he Entity classes to navigate between them (like Product.Orders). But is ASP.NET Dynamic Data able to recognize these additional properties to show them on the web site? Is it possible to hide the Junction Tables then? And it will be the case that there is just too many related data. For example there could be too many orders for a specific product to directly display them in the products table on the web site. Is it possible to just show a link "Show related orders" instead?

Could some of my problems easier be solved by using Entity Framework? I did read that Entity Framework is capable of resolving Many to Many Relationships, but it is very often the case that if you decide to use another technology to perform a task other problems will occur.

Thanks for your time. You are helping me a lot.


The process of migrating an existing DynamicData solution from Linq2SQL to EF can be done easily using a void DD EF Solution as reference.

The process involve mostly the editing of the page templates.

If necessary I think I can give you some reference: I migrated one of my projects to take advantage of the automatic many to many templating.

F.

0

精彩评论

暂无评论...
验证码 换一张
取 消