c# - Use same local database in independent projects -


i have solution several projects:

  • a class library contains database context, lets call datumclasslibrary.
  • a class library contains model entities, lets call modelsclasslibray
  • a class library contains repositories model entities of modelsclasslibray, lets call repositoriesclasslibrary.

besides have other projects, 1 mvc5 application , other webapi application.

how can use same local db file both mvc5 application , webapi application, using entity framework code first?

ef doesn't care how/where use it...
pass correct connection string in context's constructor every time use it


Comments

Popular posts from this blog

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

jsf - "PropertyNotWritableException: Illegal Syntax for Set Operation" error when setting value in bean -

arrays - Algorithm to find ideal starting spot in a circle -