Example #1
0
        public Guid Add(Dictionary<string, string> fields, Guid rowId)
        {
            var entry = new Entry
            {
                Id = ToId(rowId),
                CreatedDate = DateTime.Now,
                FieldValues = fields
            };

            var indexResponse = Client.Index(entry);
            if (indexResponse.Created)
            {
                // the entry was successfully saved to the index. return the entry ID.
                return rowId;
            }

            LogEntryCreationError("field values", indexResponse);
            return Guid.Empty;
        }
Example #2
0
 private static StorageRow ToFormRow(Entry entry)
 {
     return new StorageRow(Guid.Parse(entry.Id), entry.CreatedDate, entry.FieldValues);
 }