Пример #1
0
        public IActionResult Create([FromBody]  RealizationItem realizationItem)
        {
            _context.Add(realizationItem);

            _context.SaveChanges();
            return(CreatedAtRoute("GetRealizationItem", new { id = realizationItem.Id }, realizationItem));
        }
Пример #2
0
        public IActionResult Update([FromBody]  RealizationItem realizationItem)
        {
            if (realizationItem == null)
            {
                return(BadRequest());
            }

            _context.Update(realizationItem);

            _context.SaveChanges();
            return(CreatedAtRoute("GetRealizationItem", new { id = realizationItem.Id }, realizationItem));
        }