public ResponseWrapper <EditIntPropertyModel> EditIntProperty(int intpropertyId, EditIntPropertyInputModel model) { var entity = context .IntProperties .Single(x => x.IntPropertyId == intpropertyId ); entity.MaxValue = model.MaxValue; entity.MinValue = model.MinValue; entity.PropertyId = model.PropertyId; context.SaveChanges(); var response = new EditIntPropertyModel { IntPropertyId = entity.IntPropertyId, MaxValue = entity.MaxValue, MinValue = entity.MinValue, PropertyId = entity.PropertyId, }; return(new ResponseWrapper <EditIntPropertyModel>(_validationDictionary, response)); }
public dynamic EditIntProperty(int intpropertyId, [FromBody] EditIntPropertyInputModel model) { var orchestrator = new IntPropertyOrchestrator(new ModelStateWrapper(this.ModelState)); return(orchestrator.EditIntProperty(intpropertyId, model).GetResponse()); }