Esempio n. 1
0
        public IQueryable <Customer> DeleteCustomer(string id)
        {
            IQueryable <Customer> customers = _context.Customer.Where(a => a.CusId == id);

            _context.Customer.Remove(customers.FirstOrDefault());
            _context.SaveChangesAsync();
            return(customers);
        }
Esempio n. 2
0
        public IQueryable <CarsInfo> DeleteCar(string id)
        {
            IQueryable <CarsInfo> carsInfos = _context.CarsInfo.Where(a => a.Id == id);

            _context.CarsInfo.Remove(carsInfos.FirstOrDefault());
            _context.SaveChangesAsync();
            return(carsInfos);
        }
        public IQueryable <Owned> DeleteCar(string id)
        {
            //_context.Owned.FindAsync(id);
            IQueryable <Owned> owned = _context.Owned.Where(a => a.CarId == id);

            _context.Owned.Remove(owned.FirstOrDefault());
            _context.SaveChangesAsync();
            return(owned);
        }