public async Task<HttpResponseMessage> PostConstraint(Guid id, ConstraintSaveRequest constraint) { await _componentsRepository.SaveConstraint(new Constraint { Id = id, ConstraintGroupId = constraint.ConstraintGroupId, Name = constraint.Name, Description = constraint.Description, Equation = constraint.Equation.ToEquationObject(), SetConstraint = constraint.SetConstraint.ToEquationObject(), }); return Request.CreateResponse(HttpStatusCode.OK); }
public async Task <HttpResponseMessage> PostConstraint(Guid id, ConstraintSaveRequest constraint) { await _modelRepository.SaveConstraint(new Constraint { Id = id, ConstraintGroupId = constraint.ConstraintGroupId, Name = constraint.Name, Description = constraint.Description, Equation = constraint.Equation.ToEquationObject(), SetConstraint = constraint.SetConstraint.ToEquationObject(), }); return(Request.CreateResponse(HttpStatusCode.OK)); }