public async Task <IHttpActionResult> Put(int id, VehicleToMfrBodyCodeInputModel model) { var changeRequestId = await _vehicleToMfrBodyCodeApplicationService.UpdateAsync(new VehicleToMfrBodyCode() { Id = model.Id, VehicleId = model.Vehicle.Id, MfrBodyCodeId = model.MfrBodyCode.Id }, id, CurrentUser.Email); return(Ok(changeRequestId)); }
public async Task <IHttpActionResult> Post(int id, VehicleToMfrBodyCodeInputModel vehicleToMfrBodyCodeInputModel) { CommentsStagingModel comment = new CommentsStagingModel() { Comment = vehicleToMfrBodyCodeInputModel.Comment }; var attachments = SetUpAttachmentsModels(vehicleToMfrBodyCodeInputModel.Attachments); var changeRequestId = await _vehicleToMfrBodyCodeApplicationService.DeleteAsync(null, id, CurrentUser.Email, comment, attachments); return(Ok(changeRequestId)); }
public async Task <IHttpActionResult> Post(VehicleToMfrBodyCodeInputModel model) { CommentsStagingModel comment = new CommentsStagingModel() { Comment = model.Comment }; var attachments = SetUpAttachmentsModels(model.Attachments); var changeRequestId = await _vehicleToMfrBodyCodeApplicationService.AddAsync(new VehicleToMfrBodyCode() { Id = model.Id, MfrBodyCodeId = model.MfrBodyCode.Id, VehicleId = model.Vehicle.Id }, CurrentUser.Email, comment, attachments); return(Ok(changeRequestId)); }