Exemplo n.º 1
0
        public async Task <IEnumerable <IRegistrationLogEvent> > GetAsync(DateTime @from, DateTime to)
        {
            var partitionKey = RegistrationLogEventEntity.GeneratePartitionKey();

            return
                (await _tableStorage.WhereAsync(partitionKey, @from.Date, to.Date.AddDays(1), ToIntervalOption.ExcludeTo));
        }
Exemplo n.º 2
0
        public Task UpdateGeolocationDataAsync(string id, string countryCode, string city, string isp)
        {
            var partitionKey = RegistrationLogEventEntity.GeneratePartitionKey();

            return(_tableStorage.ReplaceAsync(partitionKey, id, entity =>
            {
                entity.City = city;
                entity.Country = countryCode;
                entity.Isp = isp;
                return entity;
            }));
        }