public IResult Delete(Vehicle car) { Vehicle result = _vehicleDal.Get(v => v.CarId == car.CarId && v.VehicleName == car.VehicleName); if (result != null) { _vehicleDal.Delete(car); return(new SuccessResult(Messages.CarDeleted)); } else { return(new ErrorResult(Messages.CarInvalid)); } }
public Vehicle Get(int id) { return(_vehicleDal.Get(v => v.VehicleId == id)); }
public IDataResult <Car> GetById(int carId) { return(new SuccessDataResult <Car>(_vehicleDal.Get(c => c.Id == carId))); }
public IDataResult <Vehicle> GetById(int vehicleId) { return(new SuccessDataResult <Vehicle>(_vehicleDal.Get(c => c.ID == vehicleId))); }
public Vehicle GetById(int productId) { return(_productDal.Get(p => p.VehicleId == productId)); }
public IDataResult <Vehicle> BringById(int id) { return(new SuccessDataResult <Vehicle>(_vehicleDal.Get(v => v.Id == id))); }