public dynamic EditEndPointModelProperty(int endpointmodelpropertyId, [FromBody] EditEndPointModelPropertyInputModel model) { var orchestrator = new EndPointModelPropertyOrchestrator(new ModelStateWrapper(this.ModelState)); return(orchestrator.EditEndPointModelProperty(endpointmodelpropertyId, model).GetResponse()); }
public ResponseWrapper <EditEndPointModelPropertyModel> EditEndPointModelProperty(int endpointmodelpropertyId, EditEndPointModelPropertyInputModel model) { var entity = context .EndPointModelProperties .Single(x => x.EndPointModelPropertyId == endpointmodelpropertyId ); entity.EndPointModelId = model.EndPointModelId; entity.EndPointPropertyId = model.EndPointPropertyId; context.SaveChanges(); var response = new EditEndPointModelPropertyModel { EndPointModelPropertyId = entity.EndPointModelPropertyId, EndPointModelId = entity.EndPointModelId, EndPointPropertyId = entity.EndPointPropertyId, }; return(new ResponseWrapper <EditEndPointModelPropertyModel>(_validationDictionary, response)); }