/// <summary> /// Creates new edge with document data within specified collection between two document vertices in current database context. /// </summary> /// <exception cref="ArgumentException">Specified 'from' and 'to' ID values have invalid format.</exception> public AResult <Dictionary <string, object> > CreateEdge <T>(string collectionName, string fromID, string toID, T obj) { if (!IsID(fromID)) { throw new ArgumentException("Specified 'from' value (" + fromID + ") has invalid format."); } if (!IsID(toID)) { throw new ArgumentException("Specified 'to' value (" + toID + ") has invalid format."); } return(CreateEdge(collectionName, fromID, toID, Dictator.ToDocument(obj))); }
/// <summary> /// Completely replaces existing edge identified by its handle with new edge data. This helper method injects 'fromID' and 'toID' fields into given document to construct valid edge document. /// </summary> public AResult <Dictionary <string, object> > ReplaceEdge <T>(string id, string fromID, string toID, T obj) { return(ReplaceEdge(id, fromID, toID, Dictator.ToDocument(obj))); }
/// <summary> /// Completely replaces existing document identified by its handle with new document data. /// </summary> /// <exception cref="ArgumentException">Specified id value has invalid format.</exception> public AResult <Dictionary <string, object> > Replace <T>(string id, T obj) { return(Replace(id, Dictator.ToDocument(obj))); }
/// <summary> /// Creates new document within specified collection in current database context. /// </summary> public AResult <Dictionary <string, object> > Create <T>(string collectionName, T obj) { //return Create(collectionName, JSON.ToJSON(DictionaryExtensions.StripObject(obj), ASettings.JsonParameters)); return(Create(collectionName, Dictator.ToDocument(obj))); }
/// <summary> /// Creates new edge with document data within specified collection between two document vertices in current database context. /// </summary> public AResult <Dictionary <string, object> > Create <T>(string collectionName, string fromID, string toID, T obj) { return(Create(collectionName, fromID, toID, Dictator.ToDocument(obj))); }