Пример #1
0
        public Staff DeleteStaff(long id)
        {
            var staff = _context.Staff.Find(id);


            _context.Staff.Remove(staff);
            _context.SaveChangesAsync();

            return(staff);
        }
Пример #2
0
        public Product DeleteProduct(long id)
        {
            var product = _context.Product.Find(id);


            _context.Product.Remove(product);
            _context.SaveChangesAsync();

            return(product);
        }