Entity Framework This property descriptor does not support the SetValue
- by Gayan
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.'.