I have Article and ApplicationUser model classes:
public class ApplicationUser
{
...
}
public class Article
{
...
public ApplicationUser CreatedBy { get; set; }
}
I have tried to set CreatedBy property to false this way:
base.Entry(entity).Property(x => x.CreatedBy).IsModified = false;
But I get this error:
The property 'CreatedBy' on entity type 'ApplicationUser' is being accessed using the 'Property' method, but is defined in the model as a navigation property. Use either the 'Reference' or 'Collection' method to access navigation properties.