Example #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));
        }
Example #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;
            }));
        }
Example #3
0
        public async Task <IRegistrationLogEvent> RegisterEventAsync(IRegistrationLogEvent evnt)
        {
            var newEntity = RegistrationLogEventEntity.Create(evnt);

            return(await _tableStorage.InsertAndGenerateRowKeyAsDateTimeAsync(newEntity, evnt.DateTime));
        }