Entity Framework - how to specify the table name for an entity class manually

Michael Roma

Below is the syntax used to specify what the exact table and schema is for an entity class defined in your project. In the example below, accountbase is the database table name, Account is the name of the EF class.

[Table(“accountbase”, Schema = “dbo”)]
public class Account
    public int id { get; set; }

    public string Email { get; set; }