RSS
 

Posts Tagged ‘entity framework’

Entity FrameWork, Deleting Item and Re-adding it.

04 Oct

This is my first try out with the Entity Framework as I was playing with the RIA Services for Silverlight 3. If you use the latest technology, let’s try the Entity Framework instead of the older LINQ2SQL technology.

My first problem that I ran into was readding a deleted table. When you delete a table from the design surface, it leaves some references that makes it unable to add the old item again.

If you look at your *.edmx file with a XML Editor (In visual studio, right click your edmx file -> Open With -> XML Editor), you’ll have to remove the traces that are left after the deletion.

Do a search for your table name, the deletion will include all EntitySets, EntityType, AssociationSets, Associations, …

If you removed all the related data, you can update your model and Readd the desired table!

Let’s continue the EF journey