Property 'X' on type 'Y' can't be set... error
Posted: Mon 22 Dec 2014 07:37
I have two tables in SQL Server 2012. One table has a foreign key (ReportCategoryID) to another table. The Entity Developer model designer created the two entities shown in the image. Retrieving data for TtbSRReport works fine in the designer. When I retrieve data for the other table, I get the error message shown. I am using the latest 5.7 version with EF 6.
Any idea why this error happens?
"The property 'TtbSRReports' on type 'TtbSRReportCategory_4E05BDD77956EA2ABCB005B78E513AE812A61232FEC44A80858D91FDE7305FD3' cannot be set because the collection is already set to an EntityCollection."
Any idea why this error happens?
"The property 'TtbSRReports' on type 'TtbSRReportCategory_4E05BDD77956EA2ABCB005B78E513AE812A61232FEC44A80858D91FDE7305FD3' cannot be set because the collection is already set to an EntityCollection."