public void Delete(int id) { if (id == 0) { throw new ArgumentException("The id can't be zero."); } repository.Delete(id); }
public void Delete(int id) { try { using (_UserBaseRepository._context = _DbContext) { _UserBaseRepository.Delete(id); _UserBaseRepository._context.SaveChanges(); } } catch (Exception error) { throw error; } }