I'm using Entity Framework "Code First" approach in a ASP.NET MVC 3 web application. In my database I have several computed columns. I need to use these columns to display data (which works fine).
However when I come to insert rows into this table, I'm getting the following error:
The column "ChargePointText" cannot be modified because it is either a computed column or is the result of a UNION operator.
Is there a way to mark the property as readonly in my class?
public class Tariff
{
public int TariffId { get; set; }
public int Seq { get; set; }
public int TariffType { get; set; }
public int TariffValue { get; set; }
public string Title { get; set; }
public string Description { get; set; }
public int ChargePoint { get; set; }
public string ChargePointText { get; set; }
}