示例#1
0
 public IEnumerable <CarSalon> GetByCity(string city)
 {
     return(from salons in _carDb.Set <CarSalon>()
            where salons.City.Contains(city)
            select new CarSalon());
 }
示例#2
0
 public void Add(T item)
 {
     _carDb.Set <T>().Add(item);
 }
 public IEnumerable <DriveWheels> GetByType(string type)
 {
     return(from drivewheels in _carDb.Set <DriveWheels>()
            where drivewheels.Type.Contains(type)
            select new DriveWheels());
 }
示例#4
0
 public IEnumerable <Car> GetAllCars()
 {
     return(_carDb.Set <Car>().ToList()); //.Include(x=> x.Color).Include(x=> x.Transmition).Include(x=>x.CompleteSet).Include(x=> x.CarPhotos).ToList();
 }