private static async Task InsertByPartitionsAsync(string[] partitions, string[] entries, IActivityTracker <DynamicTableEntity> journal)
        {
            foreach (var partition in partitions)
            {
                foreach (var entry in entries)
                {
                    DynamicTableEntity dt = new DynamicTableEntity(partition, entry);

                    const int itemCount = 6;
                    Dictionary <string, EntityProperty> valuePairs = new Dictionary <string, EntityProperty>(itemCount);
                    for (int i = 0; i < itemCount; i++)
                    {
                        valuePairs["p" + i.ToString()] = new EntityProperty($"{i} - {DateTime.Now.ToLongTimeString()}");
                    }
                    dt.Properties = valuePairs;
                    await journal.InsertAsync(dt);
                }
            }
        }
Пример #2
0
        public async Task <bool> AddAsync(int subjectId, string subjectTypeId, string value, string valueType, string actor)
        {
            var entity = GetActivityEntity(subjectId, subjectTypeId, value, valueType, actor);

            return(await _ActivityTracker.InsertAsync(entity));
        }