While integrating the scaffolded edit tab for goals there were some errors that came up while trying to use the .attach method to the db. To sidestep the problem I used a simple findbyId method to change the dbvalues instead.
Example:
in the edit controller I implimented the following code:
var dbValue = db.UserEvents.Find(userEvent.UserEventId);
dbValue.RevisionID += 1;
and since this is an http post I had to store the UserEventId in the view to allow for the find method above:
While integrating the scaffolded edit tab for goals there were some errors that came up while trying to use the .attach method to the db. To sidestep the problem I used a simple findbyId method to change the dbvalues instead.
Example: in the edit controller I implimented the following code:
var dbValue = db.UserEvents.Find(userEvent.UserEventId);
and since this is an http post I had to store the UserEventId in the view to allow for the find method above:
@Html.HiddenFor(model => model.UserEventId)