0

We are creating a big solution which has multiple WEB Project (like Accounts, HRMS, Inventory and many more). All the modules are pluggable and installed as per client's request. All the Projects have some methods which are used by other modules, like Accounting module might use GetEmployee method of HRMS, and HRMS might use the GetAccountBalanceForEmployee of Accounts. There is a common Project which tries to call the method dynamically (by loading the respective project dll). The problem is that when the methods are called, we get an error saying "The model backing context has changed since the database was created". If the same method is called from inside the same project no error occurs.

Thanks in Advance.

Unni

unniks
  • 166
  • 7
  • Sounds to me like you have an architectural problem - you don't appear to have a separate business layer, but are instead calling the web project directly (the presentation layer). You need that seperation... – Martin Milan Sep 06 '13 at 12:36
  • We are trying to call the Model of MVC. Should it not return the data? – unniks Sep 06 '13 at 12:38
  • It depends how you structure it - usually, yes. On a multi project system though, it would be more common to have a separate business layer for each area (HRMS, Accounts etc...) – Martin Milan Sep 06 '13 at 13:12
  • Methods can be called which does not have db access. But when db access is included - we get the same model backing context has been changed.. error – unniks Sep 06 '13 at 13:35
  • Check out the accepted answer here - http://stackoverflow.com/questions/3552000/entity-framework-code-only-error-the-model-backing-the-context-has-changed-sinc – Martin Milan Sep 06 '13 at 14:59

0 Answers0