Beispiel #1
0
        public static async Task SetupRecordsAgo(ITableStore <TestTableEntity> tableStorage, string ago)
        {
            await tableStorage.DeleteAllAsync();

            var entityList = new List <TestTableEntity>
            {
                new TestTableEntity("Kevin", "Bacon")
                {
                    Age = 21, Email = "*****@*****.**"
                },
                new TestTableEntity("Steven", "Jones")
                {
                    Age = 32, Email = "*****@*****.**"
                }
            };

            await tableStorage.CreateTableAsync().ConfigureAwait(false);

            await tableStorage.InsertAsync(entityList).ConfigureAwait(false);

            await Task.Delay(TimeStringParser.GetTimeAgoTimeSpan(ago));

            var anotherEntityList = new List <TestTableEntity>
            {
                new TestTableEntity("Liam", "Matthews")
                {
                    Age = 28, Email = "*****@*****.**"
                },
                new TestTableEntity("Mary", "Gates")
                {
                    Age = 45, Email = "*****@*****.**"
                }
            };

            await tableStorage.InsertAsync(anotherEntityList).ConfigureAwait(false);
        }