public IActionResult InsertYachtAttributeValueAsync([FromBody] YachtAttributeValuesCreateModels model)
        {
            var atrributeIds = model.AttributeFid;
            var result       = _yachtAttributeValueService.CreateAsync(model).Result;

            if (result.IsSuccessStatusCode)
            {
                return(Ok(result));
            }
            return(BadRequest());
        }
Exemple #2
0
        public async Task <BaseResponse <bool> > CreateAsync(YachtAttributeValuesCreateModels modelCreate)
        {
            try
            {
                var createItem = new YachtAttributeValues();
                createItem.InjectFrom(modelCreate);
                createItem.BasedAffective   = false;
                createItem.LastModifiedBy   = GetUserGuidId();
                createItem.LastModifiedDate = DateTime.Now;
                await _context.YachtAttributeValues.AddAsync(createItem);

                await _context.SaveChangesAsync();

                return(BaseResponse <bool> .Success());
            }
            catch (Exception ex)
            {
                return(BaseResponse <bool> .InternalServerError(message : ex.Message, fullMsg : ex.StackTrace));
            }
        }