IanRyder
Well-known member
Hi,
I am hoping that someone can give me some guidance when using multiple Entity Data Models (EDM?s) in a large project that I am needing to build. I am comfortable when using a single EDM but I seem to have got myself into a bit of a hole when trying to implement multiple EDM?s in a single project.
Simply put, I am using SQL Server which has multiple databases within that server and I need to design an application which will have the need to interact with various databases within that server. In principle I have created a Data Access Layer and in that layer I have added an EDM for each of the Databases that I need to interact with. The first EDM added fine but the second EDM has thrown a ton of errors all along the similar lines of:-
There are various other errors but I guess that they are all going to follow along a similar theme of what I am doing wrong.
I can easily get round this by adding each EDM to a separate project which can then be referenced by the larger project but I was just wondering if there is something stupid that I have done wrong and whether there are some better principals I should be adopting when trying to add multiple EDM?s to a single project.
Thanks for any insight that anyone can provide.
Cheers,
Ian
I am hoping that someone can give me some guidance when using multiple Entity Data Models (EDM?s) in a large project that I am needing to build. I am comfortable when using a single EDM but I seem to have got myself into a bit of a hole when trying to implement multiple EDM?s in a single project.
Simply put, I am using SQL Server which has multiple databases within that server and I need to design an application which will have the need to interact with various databases within that server. In principle I have created a Data Access Layer and in that layer I have added an EDM for each of the Databases that I need to interact with. The first EDM added fine but the second EDM has thrown a ton of errors all along the similar lines of:-
Method 'OnCustIDChanging' cannot be declared 'Partial' because only one method 'OnCustIDChanging' can be marked 'Partial'
There are various other errors but I guess that they are all going to follow along a similar theme of what I am doing wrong.
I can easily get round this by adding each EDM to a separate project which can then be referenced by the larger project but I was just wondering if there is something stupid that I have done wrong and whether there are some better principals I should be adopting when trying to add multiple EDM?s to a single project.
Thanks for any insight that anyone can provide.
Cheers,
Ian