When I run this code I get an exception at the Update method
public void UpdateTeststep(Teststep step)
{
_context.Teststeps.Where(t => t.TeststepId == step.TeststepId).Update(t => step);
_context.SaveChanges();
}
{"The update expression must be of type MemberInitExpression.\r\nParametername: updateExpression"}
What is wrong with my updateExpression?
Thats the source code of the Update method:
Line 454:
var memberInitExpression = updateExpression.Body as MemberInitExpression;
if (memberInitExpression == null)
throw new ArgumentException("The update expression must be of type MemberInitExpression.", "updateExpression");
Why is the value I pass null? Do I pass my teststep in the wrong way?