Example #1
0
        public bool Delete(int key)
        {
            bool deleteSuccessfull = false;

            Ballot foundBallot = Get(key);

            if (foundBallot != null)
            {
                _context.Ballots.Remove(foundBallot);
                _context.SaveChanges();
                deleteSuccessfull = true;
            }
            return(deleteSuccessfull);
        }
        public bool Delete(int key)
        {
            bool deleteSuccessfull = false;

            Customer foundCustomer = Get(key);

            if (foundCustomer != null)
            {
                _context.Customers.Remove(foundCustomer);
                _context.SaveChanges();
                deleteSuccessfull = true;
            }
            return(deleteSuccessfull);
        }
Example #3
0
        public bool Delete(int key)
        {
            bool deleteSuccessfull = false;

            Draw foundDraw = Get(key);

            if (foundDraw != null)
            {
                _context.Draws.Remove(foundDraw);
                _context.SaveChanges();
                deleteSuccessfull = true;
            }
            return(deleteSuccessfull);
        }