Entity Framework This property descriptor does not support the SetValue

Posted by Gayan on Stack Overflow See other posts from Stack Overflow or by Gayan
Published on 2010-12-26T13:50:19Z Indexed on 2010/12/26 13:53 UTC
Read the original article Hit count: 198

Filed under:

Hello guys, below are my entities which i have created using entity frame work.

retailer id name childs(navigation)

generated database schema

[Id] [int] IDENTITY(1,1) NOT NULL, [Name] nvarchar NOT NULL

childern id name RETAILER(navigation)

generated database schema

[Id] [int] IDENTITY(1,1) NOT NULL, [name] nvarchar NOT NULL [Retailer_Id] [int] NOT NULL,

As you can see in the above model the relationship is 1 retailer can have 0 or 1 child. my problem is when i create a new child and set the retailer navigation property of it to a retailer entity it throws the following exception.how do i solve it

Error while setting property 'retailer': 'This property descriptor does not support the SetValue method.'.

© Stack Overflow or respective owner

Related posts about entity-framework