System data updateexception an error occurred while updating the entries

I am doing lots of updates on the context and not having any issues, it's only when I try to update this particular entity. For your convenience, I copied the 4 steps from the post that I followed to solve the problem as following: UPDATE: I've gotten a few upvotes on this lately, so I figured I'd let people know the advice I give below isn't the best.

Now there are three ways to add a new object to the object context: 1. We then add this instance to the Customers set using the Entity Set. The Add Object() method is used for adding newly created objects that do not exist in the database.

In previous chapters you have seen how convention and configuration can be used to affect the model and the resulting database schema.

In this chapter you will see how the convention and configuration concept applies to the database that is used by Code First.

You’ll also discover how database initializers can be used to control the database creation process and insert seed data into the database.

This can be particularly useful when writing automated scenario tests.

Leave a Reply