private void AppendORIDToField(DictionaryOrientDBEntity entity, string field, ORID orid) { if (entity.Fields.Keys.Contains(field)) { entity.SetField(field, entity.GetField <HashSet <ORID> >(field).Add(orid)); } else { var oridHashSet = new HashSet <ORID>(); oridHashSet.Add(orid); entity.SetField(field, oridHashSet); } }
public IOCreateEdge Set <T>(string fieldName, T fieldValue) { if (_document == null) { _document = new DictionaryOrientDBEntity(); } _document.SetField(fieldName, fieldValue); return(this); }
public static DictionaryOrientDBEntity ToDictionaryOrientDBEntity <T>(this T obj) { DictionaryOrientDBEntity entity = new DictionaryOrientDBEntity(); var properties = obj.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); foreach (var property in properties) { entity.SetField(property.Name, property.GetValue(obj)); } return(entity); }
public IOCreateDocument Set <T>(string fieldName, T fieldValue) { _document.SetField <T>(fieldName, fieldValue); return(this); }