Вопрос

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