Dapper - have a different tablename than the name of your entity

Dapper will automatically look for a table with a name that matches your entity's name. However sometimes your entities do not match your tables. Perhaps you have some odd naming conventions, work with legacy tables or have some other reason. Dapper does not support this.

However there is a package - Dapper.Contrib which enables you to do this. This package extends dapper with some extra features. Such as being able to set the table to map to via annotations (stolen from dapper.contrib github):

[Table ("emps")]
public class Employee
{
    public int Id { get; set; }
    public string Name { get; set; }
}

Or change the name of the Primary key:

public class Employee
{
    [Key]
    public int EmployeeId { get; set; }
    public string Name { get; set; }
}

If you like Dapper.Contrib, I can also recommend SimpleCRUD which also has a lot of great features.