Exemplo n.º 1
0
        public Task <bool> ExistsAsync(long id, CancellationToken cancellationToken)
        {
            var spec = SpecBuilder <WeatherForecast> .Create( )
                       .WithId(id);

            return(_weatherForecastRepository.AnyAsync(spec, cancellationToken));
        }
Exemplo n.º 2
0
        public Task <bool> NotExistsAsync(int temperature, CancellationToken cancellationToken)
        {
            var spec = SpecBuilder <WeatherForecast> .Create( )
                       .WithNotTemperature(temperature);

            return(_weatherForecastRepository.AnyAsync(spec, cancellationToken));
        }
Exemplo n.º 3
0
        public Task <IPaginated <WeatherForecast> > GetAsync(Odata <WeatherForecast> odata, CancellationToken cancellationToken)
        {
            var spec = SpecBuilder <WeatherForecast> .Create( )
                       .Odata(odata);

            return(_weatherForecastRepository.SearchPaginatedAsync(spec, cancellationToken));
        }