public ResponseWrapper <EditEndPointPropertyModel> EditEndPointProperty(int endpointpropertyId, EditEndPointPropertyInputModel model) { var entity = context .EndPointProperties .Single(x => x.EndPointPropertyId == endpointpropertyId ); entity.Name = model.Name; entity.EndPointPropertyType = model.EndPointPropertyType; entity.EntityId = model.EntityId; entity.DataSourceId = model.DataSourceId; context.SaveChanges(); var response = new EditEndPointPropertyModel { EndPointPropertyId = entity.EndPointPropertyId, Name = entity.Name, EndPointPropertyType = entity.EndPointPropertyType, EntityId = entity.EntityId, DataSourceId = entity.DataSourceId, }; return(new ResponseWrapper <EditEndPointPropertyModel>(_validationDictionary, response)); }
public dynamic EditEndPointProperty(int endpointpropertyId, [FromBody] EditEndPointPropertyInputModel model) { var orchestrator = new EndPointPropertyOrchestrator(new ModelStateWrapper(this.ModelState)); return(orchestrator.EditEndPointProperty(endpointpropertyId, model).GetResponse()); }