예제 #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);
 }
예제 #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));
        }