Ejemplo n.º 1
0
        public Dictionary <string, object> Resolve(BaseRelationship source, Relationship destination, Dictionary <string, object> destMember, ResolutionContext context)
        {
            var propertyInfos = source.GetType().GetProperties();
            Dictionary <string, object> properties = new Dictionary <string, object>();

            foreach (var propertyInfo in propertyInfos)
            {
                if (propertyInfo.PropertyType.GenericTypeArguments.Count() != 0)
                {
                    continue;
                }
                else if (propertyInfo.PropertyType.IsClass && propertyInfo.PropertyType != typeof(string))
                {
                    continue;
                }
                else if (propertyInfo.Name.Contains("Id"))
                {
                    continue;
                }
                else
                {
                    properties.Add(propertyInfo.Name, propertyInfo.GetValue(source));
                }
            }
            return(properties);
        }
Ejemplo n.º 2
0
        public IEnumerable <T> GetAll <TFilter>(Expression <Func <TFilter, bool> > filter, BaseRelationship relationship)
        {
            var client = _neo4jService.Client;

            var searchedItems = client.Cypher.MatchRelationship(relationship)
                                .Where(filter)
                                .Return <T>(MatchEntity.ToLower())
                                .Results;

            return(searchedItems);
        }
Ejemplo n.º 3
0
 public void Update(RelationshipType relationshipType, ref TransactionFramework.TransactionChain chain)
 {
     BaseRelationship.Update(relationshipType, ref chain);
 }
Ejemplo n.º 4
0
 public void Delete(ref TransactionFramework.TransactionChain chain)
 {
     BaseRelationship.Delete(ref chain);
 }
Ejemplo n.º 5
0
 public void ConnectNode(ConnectionType connectionType, INode node, ref TransactionFramework.TransactionChain chain)
 {
     BaseRelationship.ConnectNode(connectionType, node, ref chain);
 }