public async Task <IHttpActionResult> Put(int id, VehicleToDriveTypeInputModel model) { var changeRequestId = await _vehicleToDriveTypeApplicationService.UpdateAsync(new VehicleToDriveType() { Id = model.Id, VehicleId = model.Vehicle.Id, DriveTypeId = model.DriveType.Id }, id, CurrentUser.Email); return(Ok(changeRequestId)); }
public async Task <IHttpActionResult> Post(int id, VehicleToDriveTypeInputModel vehicleToDriveTypeInputModel) { CommentsStagingModel comment = new CommentsStagingModel() { Comment = vehicleToDriveTypeInputModel.Comment }; var attachments = SetUpAttachmentsModels(vehicleToDriveTypeInputModel.Attachments); var changeRequestId = await _vehicleToDriveTypeApplicationService.DeleteAsync(null, id, CurrentUser.Email, comment, attachments); return(Ok(changeRequestId)); }
public async Task <IHttpActionResult> Post(VehicleToDriveTypeInputModel model) { CommentsStagingModel comment = new CommentsStagingModel() { Comment = model.Comment }; var attachments = SetUpAttachmentsModels(model.Attachments); var changeRequestId = await _vehicleToDriveTypeApplicationService.AddAsync(new VehicleToDriveType() { Id = model.Id, DriveTypeId = model.DriveType.Id, VehicleId = model.Vehicle.Id }, CurrentUser.Email, comment, attachments); return(Ok(changeRequestId)); }