tag:blogger.com,1999:blog-6907873803403737979.post3237392223340899051..comments2023-10-16T12:48:46.251+01:00Comments on C# Bits: Dynamic Data – Registering Multiple ModelsStephen J. Naughtonhttp://www.blogger.com/profile/17435527974910745156noreply@blogger.comBlogger12125tag:blogger.com,1999:blog-6907873803403737979.post-45889537709262883962013-10-24T09:29:42.776+01:002013-10-24T09:29:42.776+01:00Hi Stefan, you will get more mileage on the forum ...Hi Stefan, you will get more mileage on the forum but What I do is create a collection of models send me an e-mail direct and I will send you the code I use.<br /><br />Steve<br />P.S. my e-mail is in the top right on my blog :)Stephen J. Naughtonhttps://www.blogger.com/profile/17435527974910745156noreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-56126335008479837622013-10-23T15:29:47.455+01:002013-10-23T15:29:47.455+01:00Hy Steve,
I have a problem I can't fix since ...Hy Steve,<br /><br />I have a problem I can't fix since days. I have a Dynamic Data project with Entity Framework 5. I try to register multiple DbContexts. I always get the error: "The context type ... is not supported.". When I try the trick with IObjectContextAdapter to use the ObjectContext it works only for the first Model. Then I get a duplicated key violation. On my search I found the DynamicData.EFCodeFirstProvider. When I use it, I get the same error again "The context type 'DynamicData.EFCodeFirstProvider.EFCodeFirstDataModelProvider' is not supported". What am I making wrong? Please help me,<br /><br />StefanAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-33701195691770578182010-09-24T17:32:48.885+01:002010-09-24T17:32:48.885+01:00Hi can you send me your schema, so I can build the...Hi can you send me your schema, so I can build the DB structure and test it please, my e-mail is in the top right of my blog.<br /><br />Steve.Stephen J. Naughtonhttps://www.blogger.com/profile/17435527974910745156noreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-23615615869621158682010-09-24T17:28:18.088+01:002010-09-24T17:28:18.088+01:00Steve, It is not a matter of PK-FK but it a matter...Steve, It is not a matter of PK-FK but it a matter of relationship based on "string" and not on "int"...<br /><br />Please see the data....relationship is set on "DealerID"....Primary key is "DealerID" of Dealer table.<br /><br />Dealer<br />--------------------<br />ID -- DealerID(PK)<br />--------------------<br />1 -- DMIT<br />2 -- DMOT<br />3 -- DMEM<br />4 -- DMER<br /><br />Table DealerVendor<br />--------------------<br />Id -- DealerId(FK)<br />--------------------<br />1 -- DMIT<br />2 -- DMIT<br />3 -- DMEM<br />4 -- DMIT<br />5 -- DMEM<br />6 -- DMOT<br />7 -- DMOT<br /><br />Now....please help me in this scenario....Alexanderhttps://www.blogger.com/profile/11651703883674339644noreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-11386940352284557942010-09-22T23:26:05.931+01:002010-09-22T23:26:05.931+01:00You cannot have that kind of relationship it must ...You cannot have that kind of relationship it must be PK->FK not FK->FKStephen J. Naughtonhttps://www.blogger.com/profile/17435527974910745156noreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-30001893942532681672010-09-22T22:28:00.454+01:002010-09-22T22:28:00.454+01:00Hi Steve!!
Need help regarding Foreign Key relati...Hi Steve!!<br /><br />Need help regarding Foreign Key relationship in Dynamic Data [Linq to Sql] project.<br /><br />I have two tables : Dealer & DealerVendor and the relationShip is set on DealerId(One to Many) and not on ID.<br /><br />the structure of tables are :<br /><br />Table Dealer :<br />Id as Int Primary<br />DealerID as string,<br />Description as string<br /><br />Table DealerVendor :<br />Id as int primary,<br />DealerID as string<br /><br />my problem is that, that when i click on Dealer Table it displays the DealerVendor column but when i click on DealerVendor link i got an error <br />"Operator '==' incompatible with operand types 'String' and 'Int32' "<br /><br />because the List.aspx shows the querystring of ID column not the DealerID.....<br /><br />I want that it should display the DealerId link so that DealerVendor table can be sorted on "DealerId"...<br /><br />Please help me in this matter.<br /><br />Appreciate for quick help.Alexanderhttps://www.blogger.com/profile/11651703883674339644noreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-49195288268044065892010-09-16T00:07:02.006+01:002010-09-16T00:07:02.006+01:00Thanks it does encourage me :)Thanks it does encourage me :)Stephen J. Naughtonhttps://www.blogger.com/profile/17435527974910745156noreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-48861699441689782942010-09-15T19:13:38.687+01:002010-09-15T19:13:38.687+01:00Thanks a lot.....very useful article....It solved ...Thanks a lot.....very useful article....It solved my problem.........thanksAlexanderhttps://www.blogger.com/profile/11651703883674339644noreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-23216565798602726182010-06-22T14:18:33.438+01:002010-06-22T14:18:33.438+01:00Sorry I've never had a need for this sort of t...Sorry I've never had a need for this sort of thing so I have never had to create a solution.<br /><br />Steve :(Stephen J. Naughtonhttps://www.blogger.com/profile/17435527974910745156noreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-2961436441541418912010-06-22T13:17:52.599+01:002010-06-22T13:17:52.599+01:00I have multiple databases that share the same Data...I have multiple databases that share the same DataContext and I need to switch between them. I can see no way to do this, is there any way to reset the MetaModel. <br /><br />I noticed in the stack trace there is some dictionary that contains the Registered DataContexts. What I need is to be able to reset this dictionary, why cant we do this?!<br /><br />Thanks.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-47475510653529323552010-01-29T12:05:04.212+00:002010-01-29T12:05:04.212+00:00Yes possible indeed, bu I would not even have mult...Yes possible indeed, bu I would not even have multiple pages I would surround the two gridview with a pannel and make the pannel visible when you click the relavent button :)<br /><br />Steve :DStephen J. Naughtonhttps://www.blogger.com/profile/17435527974910745156noreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-17132625830934567912010-01-29T11:55:33.519+00:002010-01-29T11:55:33.519+00:00Hi
Can you help me?
if I want to view in default....Hi<br /><br />Can you help me?<br />if I want to view in default.aspx page only 1, create a new aspx page with 2 button (1 for TableS1 and 1 for TableS2) and a redirect to default.aspx?<br />It´s possible?<br /> byeAnonymousnoreply@blogger.com