Beispiel #1
0
        private static Customer DeserializingCustomer(JsonValueTableEntity value)
        {
            var c = JsonConvert.DeserializeObject <Customer>(value.Value);

            c.CreationDateTime = value.Timestamp;
            return(c);
        }
Beispiel #2
0
 public async Task UpdateAsync(Note record)
 {
     var newRecord = new JsonValueTableEntity
     {
         Value        = record.ToJson(),
         PartitionKey = PartitionKey,
         RowKey       = record.RowId
     };
     await _repository.Update(newRecord);
 }
Beispiel #3
0
 public async Task CreateAsync(Customer record)
 {
     var newRecord = new JsonValueTableEntity
     {
         Value        = record.ToJson(),
         PartitionKey = PartitionKey,
         RowKey       = record.RowId
     };
     await _repository.Insert(newRecord);
 }
Beispiel #4
0
        public async Task WriteData()
        {
            var result = GetTempDataAsync();

            try
            {
                var item = new JsonValueTableEntity()
                {
                    Value        = result,
                    PartitionKey = "partitionKey",
                    RowKey       = Guid.NewGuid().ToString()
                };

                await _azure.Insert(item);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
Beispiel #5
0
        private static Note DeserializingNote(JsonValueTableEntity value)
        {
            var c = JsonConvert.DeserializeObject <Note>(value.Value);

            return(c);
        }