code generation strategy to "default" in visual studio 2013

c# entity-framework-6

Popular Answer

I'm dealing with an asp.net webform, so I'm not sure if my response will be of any use to you. Nevertheless, this is my response.

1. Delete the previous edmx file.

2. Eliminate the previous connection string.

3. Add the ado.net entity model once more and adjust the settings as previously.

4.Avoid deleting.tt files and attempting to alter code strategy generation.

rebuild the solution.

6. I think you would now see a number of mistakes regardingAddObject and DeleteObject ... Change These two to Add and Remove by simply doing so (notice that fordeleteObject Earlier, you might not have needed to write the table name, but for removal, you must do so).

for instance:db.News.AddObject(N); updates todb.News.Add(N); and db.News.DeleteObject(N); updates todb.News.Remove(N); and db.DeleteObject(N); db.News.Remove(N); changes

2
3/4/2015 8:27:53 AM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow