public async Task <IHttpActionResult> Put(int id, VehicleToWheelBaseInputModel model) { var changeRequestId = await _vehicleToWheelBaseApplicationService.UpdateAsync(new VehicleToWheelBase() { Id = model.Id, VehicleId = model.Vehicle.Id, WheelBaseId = model.WheelBase.Id }, id, "update-requestor"); return(Ok(changeRequestId)); }
public async Task <IHttpActionResult> Post(int id, VehicleToWheelBaseInputModel vehicleToWheelBaseInputModel) { CommentsStagingModel comment = new CommentsStagingModel() { Comment = vehicleToWheelBaseInputModel.Comment }; var attachments = SetUpAttachmentsModels(vehicleToWheelBaseInputModel.Attachments); var changeRequestId = await _vehicleToWheelBaseApplicationService.DeleteAsync(null, id, CurrentUser.Email, comment, attachments); return(Ok(changeRequestId)); }
public async Task <IHttpActionResult> Post(VehicleToWheelBaseInputModel model) { CommentsStagingModel comment = new CommentsStagingModel() { Comment = model.Comment }; var attachments = SetUpAttachmentsModels(model.Attachments); var changeRequestId = await _vehicleToWheelBaseApplicationService.AddAsync(new VehicleToWheelBase() { Id = model.Id, WheelBaseId = model.WheelBase.Id, VehicleId = model.Vehicle.Id, }, CurrentUser.Email, comment, attachments); return(Ok(changeRequestId)); }