Is there a way to do what this code did in EF Core RC 2?
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Convention
In Entity Framework NET core v2 you can choose to pluralize or singularize DbSets and Collections with a hook.
public class MyDesignTimeServices : IDesignTimeServices
{
public void ConfigureDesignTimeServices(IServiceCollection services)
{
services.AddSingleton();
}
}
public class MyPluralizer : IPluralizer
{
public string Pluralize(string name)
{
return Inflector.Inflector.Pluralize(name) ?? name;
}
public string Singularize(string name)
{
return Inflector.Inflector.Singularize(name) ?? name;
}
}
See this answer for more information: https://stackoverflow.com/a/47410837/869033