public async Task <IHttpActionResult> GetFuelSystemControlTypeById(int id) { FuelSystemControlType fuelSystemControlType = await _fuelSystemControlTypeApplicationService.GetAsync(id); FuelSystemControlTypeViewModel fuelSystemControlTypeViewModel = Mapper.Map <FuelSystemControlTypeViewModel>(fuelSystemControlType); return(Ok(fuelSystemControlTypeViewModel)); }
public async Task <IHttpActionResult> Post(FuelSystemControlTypeInputModel fuelSystemControlTypeInputModel) { // create fuelSystemControlType and list of comments FuelSystemControlType fuelSystemControlType = new FuelSystemControlType() { Id = fuelSystemControlTypeInputModel.Id, FuelSystemControlTypeName = fuelSystemControlTypeInputModel.Name }; CommentsStagingModel comment = new CommentsStagingModel() { Comment = fuelSystemControlTypeInputModel.Comment }; var attachments = SetUpAttachmentsModels(fuelSystemControlTypeInputModel.Attachments); var changeRequestId = await _fuelSystemControlTypeApplicationService.AddAsync(fuelSystemControlType, CurrentUser.Email, comment, attachments); return(Ok(changeRequestId)); }