public static RawLogEventEntity CreateByClient(IRawLogEvent src, string clientId)
 {
     return(new RawLogEventEntity
     {
         PartitionKey = clientId,
         DateTime = src.DateTime,
         Data = src.Data,
         EventType = src.EventType
     });
 }
 public static RawLogEventEntity Create(IRawLogEvent src)
 {
     return(new RawLogEventEntity
     {
         PartitionKey = GeneratePartitionKey(src.PaymentSystem),
         DateTime = src.DateTime,
         Data = src.Data,
         EventType = src.EventType
     });
 }
        public async Task RegisterEventAsync(IRawLogEvent evnt, string clientId = null)
        {
            var newEntity = RawLogEventEntity.Create(evnt);
            await _tableStorage.InsertAndGenerateRowKeyAsDateTimeAsync(newEntity, evnt.DateTime);

            if (!string.IsNullOrWhiteSpace(clientId))
            {
                var byCLient = RawLogEventEntity.CreateByClient(evnt, clientId);
                await _tableStorage.InsertAndGenerateRowKeyAsDateTimeAsync(byCLient, evnt.DateTime);
            }
        }