You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These commands in the EF6 tooling were extremely helpful for my project setup. Basically I have a class library which contains the entity defintions, context, and API for a set of entities. My use case is allowing other programmers to use my API. I've abstracted as much of EF as I can since my API wraps it and they don't care about that. However, this means I am supplying my context connection string at run time like this:
public MyApiDbContext() : base(ApiInitializer.GetConnectionStringName())
and my initializer has them call a command `ApiInitializer.Initialize(connectionStringName) in app startup. This allows my API library to be DB agnostic and anyone wanting to utilize my entities can do so. But this setup doesn't work with your tools. It would work in EF6 tools normally by allowing to specify the startup project as the actual web app and then supplying the connection string name. Or also work by just supplying the full connection string and provider string manually in the migrate command. Any chance you could implement either of those?
Awesome library and thank you, can't believe MS has had no tooling in class libraries for over 9 months still and no ability to run tooling on EF6 in .NET CORE. Too long for very common scenarios.