public async Task <IHttpActionResult> Put(int id, VehicleToBedConfigInputModel model) { var changeRequestId = await _vehicleToBedConfigApplicationService.UpdateAsync(new VehicleToBedConfig() { Id = model.Id, VehicleId = model.Vehicle.Id, BedConfigId = model.BedConfig.Id }, id, "update-requestor"); return(Ok(changeRequestId)); }
public async Task <IHttpActionResult> Post(int id, VehicleToBedConfigInputModel vehicleToBedConfigInputModel) { CommentsStagingModel comment = new CommentsStagingModel() { Comment = vehicleToBedConfigInputModel.Comment }; var attachments = SetUpAttachmentsModels(vehicleToBedConfigInputModel.Attachments); var changeRequestId = await _vehicleToBedConfigApplicationService.DeleteAsync(null, id, CurrentUser.Email, comment, attachments); return(Ok(changeRequestId)); }
public async Task <IHttpActionResult> Post(VehicleToBedConfigInputModel model) { CommentsStagingModel comment = new CommentsStagingModel() { Comment = model.Comment }; var attachments = SetUpAttachmentsModels(model.Attachments); var changeRequestId = await _vehicleToBedConfigApplicationService.AddAsync(new VehicleToBedConfig() { Id = model.Id, BedConfigId = model.BedConfig.Id, VehicleId = model.Vehicle.Id }, CurrentUser.Email, comment, attachments); return(Ok(changeRequestId)); }