I have a property Reviews
in the model Activity
, in the action details , I try to increase the Reviews
, and I do it with the following code:
Db.Entry(entityName).Property(x => x.Reviews).IsModified = true;
Return View();
The funny thing is that it worked perfectly, but suddenly, the Visual Studio generates the following error:
Member 'IsModified' can not be called for property "Reviews" because The entity of type 'Activity' does not exist in the context. To add an Entity to the context call the Add or Attach method of DbSet.
I do not know what is wrong, it seems very strange to me.
Let's see if someone can tell me what this is about.
Thanks !!