public Task <bool> ExistsAsync(long id, CancellationToken cancellationToken) { var spec = SpecBuilder <WeatherForecast> .Create( ) .WithId(id); return(_weatherForecastRepository.AnyAsync(spec, cancellationToken)); }
public Task <bool> NotExistsAsync(int temperature, CancellationToken cancellationToken) { var spec = SpecBuilder <WeatherForecast> .Create( ) .WithNotTemperature(temperature); return(_weatherForecastRepository.AnyAsync(spec, cancellationToken)); }
public Task <IPaginated <WeatherForecast> > GetAsync(Odata <WeatherForecast> odata, CancellationToken cancellationToken) { var spec = SpecBuilder <WeatherForecast> .Create( ) .Odata(odata); return(_weatherForecastRepository.SearchPaginatedAsync(spec, cancellationToken)); }