Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
        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));
        }