質問

I am using Entity Framework 6, and code first. I have a Data, Bus, App layers. I wan to seed my data from the business layer, without coupling it onto the Data layer.

The reason I would like to do it in the bus. layer is that some of the seed data is quite specific to the business logic, and I would like to use some of the logic in the bus. layer when I insert into the DB.

Is there way to do this?

役に立ちましたか?

解決

I ended up solving this by: EnableMigration -ProjectName DataProject -ContextProjectName BusinessProject

Works well!

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top