Exemple #1
0
        public IActionResult Delete(int id)
        {
            var equipment = _context.equipment.Where(c => c.equipmentId == id).FirstOrDefault <equipment>();

            if (equipment != null)
            {
                _context.Remove(equipment);

                _context.SaveChanges();

                return(Ok());
            }
            else
            {
                return(NotFound());
            }
        }
Exemple #2
0
        public IActionResult Delete(int id)
        {
            var company = _context.company.Where(c => c.companyId == id).FirstOrDefault <company>();

            if (company != null)
            {
                _context.Remove(company);

                _context.SaveChanges();

                return(Ok());
            }
            else
            {
                return(NotFound());
            }
        }