I am trying to save the data in the database. Table name is product_color
.
public void PostAddColour1()
{
product_color pc = new product_color();
pc.id = 999;
pc.product_id=2;
pc.color_id=1;
pc.display_order=3;
db.product_color.Add(pc);
db.SaveChanges();
}
This is the function code to insert the data into table.
when db.SaveChanges();
is called the below error shows:
Unable to update the EntitySet 'product_color' because it has a
DefiningQuery and no <InsertFunction> element exists in the
ModificationFunctionMapping> element to support the current operation.