public async Task <IHttpActionResult> Post(int id, BodyStyleConfigInputModel model)
        {
            BodyStyleConfig bodyStyleConfig = new BodyStyleConfig()
            {
                Id = model.Id,
                VehicleToBodyStyleConfigCount = model.VehicleToBodyStyleConfigCount
            };
            CommentsStagingModel comment = new CommentsStagingModel()
            {
                Comment = model.Comment,
            };
            var attachments     = SetUpAttachmentsModels(model.Attachments);
            var changeRequestId = await _bodyStyleConfigApplicationService.DeleteAsync(bodyStyleConfig, id, CurrentUser.Email, comment, attachments);

            return(Ok(changeRequestId));
        }
        public async Task <IHttpActionResult> Post(BodyStyleConfigInputModel model)
        {
            BodyStyleConfig bodyStyleConfig = new BodyStyleConfig()
            {
                Id             = model.Id,
                BodyNumDoorsId = model.BodyNumDoorsId,
                BodyTypeId     = model.BodyTypeId
            };
            CommentsStagingModel comment = new CommentsStagingModel()
            {
                Comment = model.Comment
            };
            var attachments     = SetUpAttachmentsModels(model.Attachments);
            var changeRequestId = await _bodyStyleConfigApplicationService.AddAsync(bodyStyleConfig, CurrentUser.Email, comment, attachments);

            return(Ok(changeRequestId));
        }
        public async Task <IHttpActionResult> Replace(int id, BodyStyleConfigInputModel model)
        {
            BodyStyleConfig bodyStyleConfig = new BodyStyleConfig()
            {
                Id                        = model.Id,
                BodyNumDoorsId            = model.BodyNumDoorsId,
                BodyTypeId                = model.BodyTypeId,
                VehicleToBodyStyleConfigs = model.VehicleToBodyStyleConfigs.Select(item => new VehicleToBodyStyleConfig
                {
                    BodyStyleConfigId = item.BodyStyleConfigId,
                    Id        = item.Id,
                    VehicleId = item.VehicleId
                }).ToList(),
            };

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

            return(Ok(changeRequestId));
        }