Gdzie jest namespace tego Inflectora, bo mnie zaraz #!$%@?.
https://docs.microsoft.com/en-us/ef/core/what-is-new/ef-core-2.0#pluralization-hook-for-dbcontext-scaffolding
EF Core 2.1.
#programowanie #dotnet #entityframework
https://docs.microsoft.com/en-us/ef/core/what-is-new/ef-core-2.0#pluralization-hook-for-dbcontext-scaffolding
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;
}
}
EF Core 2.1.
#programowanie #dotnet #entityframework
#entityframework #programowanie #csharp
https://ayende.com/blog/3955/repository-is-the-new-singleton
https://www.infoworld.com/article/3117713/application-development/design-patterns-that-i-often-avoid-repository-pattern.html
Dlaczego?
Bo praktycznie w każdym średnim projekcie będziesz używał rozszerzeń dedykowanych do ORM-a którego użyłeś.
Np Fetch w NHibernate vs Include w EF