Пример #1
0
        public async Task <IActionResult> EditProductModelProductDescriptionCulture(string cultureID, int productDescriptionID, int productModelID, [FromBody] Production.ProductModelProductDescriptionCulture value)
        {
            var existing = await _db.Production_ProductModelProductDescriptionCulture.FirstOrDefaultAsync(x => x.CultureID == cultureID && x.ProductDescriptionID == productDescriptionID && x.ProductModelID == productModelID);

            if (existing == null)
            {
                return(NotFound());
            }

            existing.ProductModelID       = value.ProductModelID;
            existing.ProductDescriptionID = value.ProductDescriptionID;
            existing.CultureID            = value.CultureID;
            existing.ModifiedDate         = value.ModifiedDate;

            _db.Production_ProductModelProductDescriptionCulture.Update(existing);
            await _db.SaveChangesAsync();

            return(NoContent());
        }
Пример #2
0
        public async Task <IActionResult> CreateProductModelProductDescriptionCulture([FromBody] Production.ProductModelProductDescriptionCulture value)
        {
            _db.Production_ProductModelProductDescriptionCulture.Add(value);
            await _db.SaveChangesAsync();

            return(Ok(value));
        }