Dapper use singular table name

Dapper.Contrib supports the Table attribute. Use it to manually specify the name of the table that an entity uses. See the docs for further information.

Alternatively there is a static delegate on SqlMapperExtensions called TableNameMapper. You can replace this with an implementation that performs the pluralization. PluralizationService in the framework can help you here.

It is used as follows:

SqlMapperExtensions.TableNameMapper = (type) => {
    // do something here to pluralize the name of the type
    return type.Name;
};

Tags:

C#

Dapper