Esempio n. 1
0
        public void Update(string id, TEntity entity)
        {
            Individual individual = GraphProxy.Graph.CreateIndividual(new Uri(new Uri(SemanticRepositories.GraphProxy.IndividualsDomain), id.ToString()));

            SetProperties(entity, individual);
            GraphProxy.SaveChanges();
        }
Esempio n. 2
0
        public virtual void Remove(string id)
        {
            OntologyResource instance = GetClass(EntityName).Instances.FirstOrDefault(s => s.GetId() == id);

            if (instance == null)
            {
                return;
            }
            GraphProxy.Graph.Retract(instance.Triples.ToList());
            GraphProxy.SaveChanges();
        }