Example #1
0
        public async Task <Account[]> FindUpdated(string since, CancellationToken ct = default(CancellationToken))
        {
            if (!DateTime.TryParse(since, out DateTime target))
            {
                target = DateTime.MinValue;
            }
            var list = await _store.List()
                       .Where(a => a.WhenCreated.CompareTo(target) >= 0 || a.UpdatedAt.CompareTo(target) >= 0)
                       .ToArrayAsync(ct);

            return(Mapper.Map <Account[]>(list, opts => {
                opts.Items["serviceUrl"] = _serviceUrl;
                opts.Items["profileOptions"] = _options.Profile;
            }));
        }