ef core add-migration separate assembly for data and domainmodel -


i have 3 projects in (vs2017 , ef core) , want run add-migration.

  • web - startup
  • core - domainmodel - here entitys
  • data - context , migrations here. , dependes on ef core

the domainmodel have entities , want have migrationfiles/ output folder in data project context file.

i want avoid having dependecies between domainmodel , entity framework. entityframeworkscore have dependecies data. suggestions how run add-migration setup migrationfiles in data instead of core/domainmodel?

add-migration -name initmigration -outputdir migrations -context mydbcontext -project business\core

according @joakimja solution run:

add-migration command without -context mydbcontext -project business\core arguments.


Comments

Popular posts from this blog

'hasOwnProperty' in javascript -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

How to understand 2 main() functions after using uftrace to profile the C++ program? -