예제 #1
0
        public IActionResult RemoveZamowienie(int id)
        {
            var dost = _context.Zamowienie.FirstOrDefault((d => d.IdZam == id));

            if (dost == null)
            {
                return(NotFound());
            }
            else
            {
                _context.Remove(dost);
                _context.SaveChanges();
                return(Ok("usunieto zamowienie"));
            };
        }
예제 #2
0
        public IActionResult RemoveDostawca(int id)
        {
            var dost = _context.Dostawca.FirstOrDefault((d => d.IdPrac == id));

            if (dost == null)
            {
                return(NotFound());
            }
            else
            {
                _context.Remove(dost);
                _context.SaveChanges();
                return(Ok("usunieto uzytkownika"));
            };
        }