Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Having a base abstract migration breaks loading metadata from code first context #28

Open
kamfel opened this issue Dec 15, 2020 · 0 comments

Comments

@kamfel
Copy link

kamfel commented Dec 15, 2020

Hi!

I tried to incorporate this library in my tests but I got an exception: System.MissingMethodException: 'Cannot create an abstract class.'.
The problem seems to be in CodeFirstMetadataWorkspaceFactory.GetCacheName(), where the method tries to instantiate the base abstract migration.

Steps to reproduce:

  1. Have an abstract migration in the same project as your DbContext
  2. Try to load metadata
    var metadata = ModelMetadataGenerator.LoadFromCodeFirstContext(str => new AppDbContext(str), true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant