Accepted answer

when you update the .dbml file the .designer.cs file is also regenerated but if this file is not accessible a new file is generated and added to the project. since the classes in both files are partial but have the same properties and fields on compile you will get this error.

you can check if you have only one designer generated file for your context. you can do that by right clicking on the name of your class and selecting "go to definition" - it will show all files containing definition of your class.

Related Query

More Query from same tag