Пример #1
0
        public bool DeleteCompany(int id)
        {
            var company = _context.tbl_company.Find(id);

            if (company == null)
            {
                return(false);
            }

            _context.tbl_company.Remove(company);
            _context.SaveChanges();

            return(true);
        }
 public bool RegisterCompany(tbl_company entity)
 {
     try
     {
         _context.tbl_company.Add(entity);
         _context.SaveChanges();
         return(true);
     }
     catch
     {
         return(false);
     }
 }