Hi
I am creating the back office for a web application with dynamic data and entity framework.
Default dynamic data template is good to input basic data like names, int values, date, etc... but i am not so happy with the way many to many links are managed.
For example: I have to create marketing operations. These operations concern one or more client types (VIP, registerd, etc..)
If I keep the default dynamic data template, the user who wants to create an operation has to enter the information about the operation itself and then to navigate to the operation_ClientType page and enter the link betwwen the operation and the types of clients.
I would like the user to be able to insert and edit operations without having to navigate to another page so I am lookig for a solution here :)
I tried to use the technique in this post :http://forums.asp.net/p/1301257/3202487.aspx#3202487 which consist in a gridview field template. I have to say this is a very sexy technique since I could use it in many other cases but I am struggling because it was made for the LINQ to SQL framework and I am using Entity.
On top of that, I have another constraint : the primary key of all my link tables are an auto increment ID. So to continue with my example, my table
Operation_ClientType is designe like this :
Id (int) Primary key
OperationId (int) Foreign key references (operation)
ClientTypeId Foreign key references (ClientType)
With a unique constraint on the couple ( OperationId,ClientTypeId)
So finally I have two questions :
- Is it possible to adapt the grid view template to make it usable with Entity
- Is is a big of a problem to have an auto increment Id in the link table.
I hope I explained my problem well enough and that someone can help me :)
(Sorry about the bad english :) )