public async Task <IHttpActionResult> Post(int id, BedConfigInputModel model)
        {
            BedConfig bedConfig = new BedConfig()
            {
                Id = model.Id,
                VehicleToBedConfigCount = model.VehicleToBedConfigCount
            };
            CommentsStagingModel comment = new CommentsStagingModel()
            {
                Comment = model.Comment,
            };
            var attachments     = SetUpAttachmentsModels(model.Attachments);
            var changeRequestId = await _bedConfigApplicationService.DeleteAsync(bedConfig, id, CurrentUser.Email, comment, attachments);

            return(Ok(changeRequestId));
        }
        public async Task <IHttpActionResult> Post(BedConfigInputModel model)
        {
            BedConfig bedConfig = new BedConfig()
            {
                Id          = model.Id,
                BedLengthId = model.BedLengthId,
                BedTypeId   = model.BedTypeId
            };
            CommentsStagingModel comment = new CommentsStagingModel()
            {
                Comment = model.Comment
            };
            var attachments     = SetUpAttachmentsModels(model.Attachments);
            var changeRequestId = await _bedConfigApplicationService.AddAsync(bedConfig, CurrentUser.Email, comment, attachments);

            return(Ok(changeRequestId));
        }
        public async Task <IHttpActionResult> Replace(int id, BedConfigInputModel model)
        {
            BedConfig bedConfig = new BedConfig()
            {
                Id                  = model.Id,
                BedLengthId         = model.BedLengthId,
                BedTypeId           = model.BedTypeId,
                VehicleToBedConfigs = model.VehicleToBedConfigs.Select(item => new VehicleToBedConfig
                {
                    BedConfigId = item.BedConfigId,
                    Id          = item.Id,
                    VehicleId   = item.VehicleId
                }).ToList(),
            };

            CommentsStagingModel comment = new CommentsStagingModel {
                Comment = model.Comment
            };
            var attachments     = SetUpAttachmentsModels(model.Attachments);
            var changeRequestId = await _bedConfigApplicationService.ReplaceAsync(bedConfig, id, CurrentUser.Email, comment, attachments);

            return(Ok(changeRequestId));
        }