I’m using Entity Code First in a project, and I want to make my tables have names different from the models.
I tried to use the DataAnnotation Table in the model class:
[Table("tbBudget")]
public class Budget : IValidatableObject
{
...
But the table created is named dbo.tbBudget. The question is simple: how do I remove the dbo. from the table name in Entity?
Tables in database always belong to schema. You can not remove schema, but you can change it with fluent configuration, overriding method in DbContext
Or, as in your example, you can use TableAttribute