So I'm in trouble with this error:
An unhandled exception of type 'System.Data.Entity.ModelConfiguration.ModelValidationException' occurred in EntityFramework.dll.
Here is the code:
public ActionResult SaveItems(string[] fooItems, int category_id)
{
foreach (item item in DB.items)
{
if (item.category_id == category_id)
{
if(item != null)
DB.items.Remove(item);
DB.SaveChanges();
}
}
}
I'm trying to remove an item from the database, and save changes after that, when I get this error.
Any help is appreciated.
Thanks!
