Exemplo n.º 1
0
        public SearchResults <Car> SearchAvailable(ICurrentCaller caller, DateTime fromUtc, DateTime toUtc,
                                                   SearchOptions searchOptions,
                                                   GetOptions getOptions)
        {
            caller.GuardAgainstNull(nameof(caller));

            var cars = this.storage.SearchAvailable(fromUtc, toUtc, searchOptions);

            this.recorder.TraceInformation("Available carsApplication were retrieved by {Caller}", caller.Id);

            return(searchOptions.ApplyWithMetadata(cars
                                                   .ConvertAll(c => WithGetOptions(c.ToCar(), getOptions))));
        }
Exemplo n.º 2
0
        public SearchResults <Doctor> SearchAvailableDoctors(ICurrentCaller caller, DateTime fromUtc, DateTime toUtc,
                                                             SearchOptions searchOptions,
                                                             GetOptions getOptions)
        {
            caller.GuardAgainstNull(nameof(caller));

            var doctors = this.storage.SearchAvailableDoctors(fromUtc, toUtc, searchOptions);

            this.logger.LogInformation("Available doctors were retrieved by {Caller}", caller.Id);

            return(searchOptions.ApplyWithMetadata(doctors
                                                   .ConvertAll(doc => WithGetOptions(doc.ToDoctor(), getOptions))));
        }