I have a DB table with some nullable columns. I am developing DB first, and created an EDMX file to model the database. Using MVC4 framework.
I then scaffolded a controller and view as normal, but when I run the web application to test, I am faced with the following Constraint exception...
The 'EURam' property on 'FixHistory' could not be set to a 'null' value. You must set this property to a non-null value of type 'Decimal'.
and this points to the following scaffolded code within the controller:
public ActionResult Index()
var fixhistories = db.FixHistories.Include(f => f.Metal);
Now I need the data for that column to be nullable - sometimes the data exists, sometimes it doesn't...
How do I fix this?
I appreciate that this may be a simple question, but I am a complete Microsoft Noob.