Esempio n. 1
0
        public void Update(InventioPage page)
        {
            Pages data = EFAdapter(page);

            using (InventioEntities context = new InventioEntities())
            {
                context.Pages.Attach(data);
                context.Entry(data).State = EntityState.Modified;
                context.SaveChanges();
            }
        }
        public void Update(InventioNavigationNode node)
        {
            Navigation data = EFAdapter(node);

            using (InventioEntities context = new InventioEntities())
            {
                context.Navigation.Attach(data);
                context.Entry(data).State = EntityState.Modified;
                context.SaveChanges();
            }
        }
Esempio n. 3
0
        public void Update(InventioLayout layout)
        {
            // TODO REVISAR NO TESTEADO

            Layouts data = EFAdapter(layout);

            using (InventioEntities context = new InventioEntities())
            {
                context.Layouts.Attach(data);
                context.Entry(data).State = EntityState.Modified;
                context.SaveChanges();
            }
        }
Esempio n. 4
0
 public void Delete(int Id)
 {
     using (InventioEntities context = new InventioEntities())
     {
         Layouts selected = context.Layouts.FirstOrDefault <Layouts>(l => l.Id == Id);
         if (selected != null)
         {
             context.Layouts.Attach(selected);
             context.Layouts.Remove(selected);
             context.SaveChanges();
         }
     }
 }
Esempio n. 5
0
 public void Delete(int Id)
 {
     using (InventioEntities context = new InventioEntities())
     {
         Pages selected = context.Pages.FirstOrDefault <Pages>(p => p.Id == Id);
         if (selected != null)
         {
             context.Pages.Attach(selected);
             context.Pages.Remove(selected);
             context.SaveChanges();
         }
     }
 }
 public void Delete(int Id)
 {
     using (InventioEntities context = new InventioEntities())
     {
         Navigation selected = context.Navigation.FirstOrDefault <Navigation>(n => n.Id == Id);
         if (selected != null)
         {
             context.Navigation.Attach(selected);
             context.Navigation.Remove(selected);
             context.SaveChanges();
         }
     }
 }
Esempio n. 7
0
        public Nullable <int> Create(InventioLayout layout)
        {
            Nullable <int> ret = null;

            Layouts data = EFAdapter(layout);

            using (InventioEntities context = new InventioEntities())
            {
                context.Layouts.Add(data);
                context.SaveChanges();
                ret = data.Id;
            }

            return(ret);
        }
        public Nullable <int> Create(InventioNavigationNode node)
        {
            Nullable <int> ret = null;

            Navigation data = EFAdapter(node);

            using (InventioEntities context = new InventioEntities())
            {
                context.Navigation.Add(data);
                context.SaveChanges();
                ret = data.Id;
            }

            return(ret);
        }
Esempio n. 9
0
        public Nullable <int> Create(InventioPage page)
        {
            Nullable <int> ret = null;

            // TODO CHECK PATH no existe ya !!!!

            Pages data = EFAdapter(page);

            using (InventioEntities context = new InventioEntities())
            {
                context.Pages.Add(data);
                context.SaveChanges();
                ret = data.Id;
            }

            return(ret);
        }