public dynamic EditDeleteEndPoint(int deleteendpointId, [FromBody] EditDeleteEndPointInputModel model) { var orchestrator = new DeleteEndPointOrchestrator(new ModelStateWrapper(this.ModelState)); return(orchestrator.EditDeleteEndPoint(deleteendpointId, model).GetResponse()); }
public ResponseWrapper <EditDeleteEndPointModel> EditDeleteEndPoint(int deleteendpointId, EditDeleteEndPointInputModel model) { var entity = context .DeleteEndPoints .Single(x => x.DeleteEndPointId == deleteendpointId ); entity.EndPointId = model.EndPointId; context.SaveChanges(); var response = new EditDeleteEndPointModel { DeleteEndPointId = entity.DeleteEndPointId, EndPointId = entity.EndPointId, }; return(new ResponseWrapper <EditDeleteEndPointModel>(_validationDictionary, response)); }