Пример #1
0
        public IActionResult Update([FromBody] CrudViewModel <SalesTargetLocation> payload)
        {
            SalesTargetLocation salestargetlocation = payload.value;

            _context.SalesTargetLocation.Update(salestargetlocation);
            _context.SaveChanges();
            return(Ok(salestargetlocation));
        }
Пример #2
0
        public IActionResult Remove([FromBody] CrudViewModel <SalesTargetLocation> payload)
        {
            SalesTargetLocation salestargetlocation = _context.SalesTargetLocation
                                                      .Where(x => x.SalesTargetLocationId == (int)payload.key)
                                                      .FirstOrDefault();

            _context.SalesTargetLocation.Remove(salestargetlocation);
            _context.SaveChanges();
            return(Ok(salestargetlocation));
        }