Efcore: IPluralizer is missing in EntityFrameworkCore.Design 5.0

Created on 3 Jun 2020  路  1Comment  路  Source: dotnet/efcore

I used to implement IDesignTimeServices with IPluralizer in order to make scaffold-dbcontext works so that I can switch pluralized table names into signalized entity name. e.g. Clients -> Client

After I upgraded to EF Core 5.0, IPluralizer gone... I can no longer change my entity name. Did I miss something?

Steps to reproduce

using Inflector;
using System;
using System.Collections.Generic;
using System.Text;

namespace IB.Stock.TestConsole.EFConfig
{
    class EFPluralizer : IPluralizer
    {
        public string Pluralize(string identifier)
        {
            return Inflector.Pluralize(identifier) ?? identifier;
        }

        public string Singularize(string identifier)
        {
            return Inflector.Singularize(identifier) ?? identifier;
        }
    }
}

The above is some of my code. I cannot find any reference for IPluralizer.

Further technical details

EF Core version: 5.0.0-preview.4.20220.10
EntityFrameworkCore.Design version: 5.0.0-preview.4.20220.10
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: netcoreapp3.1
Operating system: Windows 10
IDE: Visual Studio 2019 16.3

closed-question customer-reported

>All comments

Was this page helpful?
0 / 5 - 0 ratings