コード例 #1
0
ファイル: Index.cs プロジェクト: alecrt/FormEditor
        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;
        }
コード例 #2
0
ファイル: Index.cs プロジェクト: alecrt/FormEditor
 private static StorageRow ToFormRow(Entry entry)
 {
     return new StorageRow(Guid.Parse(entry.Id), entry.CreatedDate, entry.FieldValues);
 }