Navigation property 'DoctorRegistration' on entity type 'Customer' is not virtual. UseLazyLoadingProxies requires all entity types to be public, unsealed, have virtual navigation properties, and have a public or protected constructor.
i have written 'DoctorRegistration' exactly like 'Address' .
anywhere in code that have 'virtual' for address , i use virtual for DoctorRegistration too! what should i do?
I have Same problem. System.InvalidOperationException: Navigation property 'Addresses' on entity type 'Customer' is not virtual. UseLazyLoadingProxies requires all entity types to be public, unsealed, have virtual navigation properties, and have a public or protected constructor.
Navigation property 'DoctorRegistration' on entity type 'Customer' is not virtual. UseLazyLoadingProxies requires all entity types to be public, unsealed, have virtual navigation properties, and have a public or protected constructor.
i have written 'DoctorRegistration' exactly like 'Address' .
anywhere in code that have 'virtual' for address , i use virtual for DoctorRegistration too! what should i do?
I'm facing the same problem, looked everywhere but I can't find any solution.
I am getting following error while mapping the my entity with an existing product entity
{"Navigation property 'Addresses' on entity type 'Customer' is not virtual. UseLazyLoadingProxies requires all entity types to be public, unsealed, have virtual navigation properties, and have a public or protected constructor."}
I want use the existing product id as a foreign key in my table but getting error. My code is :
You can still access the data in other tables just not use those techniques If you store ProductId in your new table use that Id in the normal places you would i.e. _productService.GetProductById(newtable.ProductId); Linq queries are a bit more complicated or Do the joins in SQL and use the output of Store Procedure calls back in code