Example #1
0
        public bool Delete(long id)
        {
            _safeOperationsRepo.DeleteByAccountId(id, AccountTypesEnum.Clients);
            Farmer farmer = GetById(id);

            _farmerEntity.Remove(farmer);
            _context.SaveChanges();
            return(true);
        }
Example #2
0
        public bool Delete(long id)
        {
            _safeOperationsRepo.DeleteByAccountId(id, AccountTypesEnum.Sellers);//Delete related record in Safe table
            Seller seller = GetById(id);

            _sellerEntity.Remove(seller);
            _context.SaveChanges();
            return(true);
        }