Skip to content
Snippets Groups Projects
Select Git revision
  • visual
  • master default protected
  • dependabot/nuget/paket-8.0.3
  • dependabot/nuget/FsUnit-5.6.1
  • dependabot/nuget/NUnit-4.0.1
  • dependabot/nuget/NUnit3TestAdapter-4.5.0
  • dependabot/nuget/NUnitLite-and-NUnit-4.0.1
  • gh-pages
  • alternative-valuetype
  • r0.18
  • v0.24.0
  • v0.23.0
  • v0.22.0
  • v0.21.0
  • v0.20.0
  • v0.19.0
  • v0.18.1
  • v0.18.0
  • v0.17.0
  • v0.16.0
  • v0.15.0
  • v0.14.0
  • v0.13.0
  • v0.12.0
  • v0.11.0
  • v0.10.1
  • v0.10.0
  • v0.9.0
  • v0.8.0
  • v0.7.1
30 results

restore.sh

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    CustomDesignTimeService.cs 847 B
    using Microsoft.EntityFrameworkCore.Design;
    using Microsoft.Extensions.DependencyInjection;
    
    namespace Coscine.Database
    {
        public class CustomDesignTimeService : IDesignTimeServices
        {
            public void ConfigureDesignTimeServices(IServiceCollection serviceCollection)
                        => serviceCollection.AddSingleton<IPluralizer, CustomPluralizer>();
        }
        
        public class CustomPluralizer : IPluralizer
        {
            Inflector.Inflector _inflector = new Inflector.Inflector(System.Globalization.CultureInfo.GetCultureInfo("en-us"));
    
            public string Pluralize(string identifier)
            {
                return _inflector.Pluralize(identifier) ?? identifier;
            }
    
            public string Singularize(string identifier)
            {
                return _inflector.Singularize(identifier) ?? identifier;
            }
        }
    }