
To do this, we can use Column
attribute in the Model property.
[Column("Active")]
[Display(Name = "Is Active?")]
public bool IsActive { get; set; }
Here, the model property name is the IsActive
however we are mapping this property to the Active
field of the database table.