In relation to another SO post I need to update my model so that the 'new' column ActiveBool doesn't try to get matched against a database table.
The model:
public class StatusList
{
[Key]
public int StatusID { get; set; }
[Required]
public byte Active { get; set; }
//I want this column to be ignored by Entity Framework
public bool ActiveBool
{
get { return Active > 0; }
set { Active = value ? Convert.ToByte(1) : Convert.ToByte(0); }
}
}
Is there an DataAnnotation that can be used?