Skip to content

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

@kamfel

Description

@kamfel

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions