Esempio n. 1
0
 public Category Editcategory(int catID)
 {
     using (var db = new EStoreContext())
     {
         return(db.categories.Find(catID));
     }
 }
Esempio n. 2
0
 public List <Category> Getcategory()
 {
     using (var db = new EStoreContext())
     {
         return(db.categories.ToList());
     }
 }
Esempio n. 3
0
 public void Updatecategory(Category category)
 {
     using (var db = new EStoreContext())
     {
         db.Entry(category).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
     }
 }
Esempio n. 4
0
 public void Savecategory(Category category)
 {
     using (var db = new EStoreContext())
     {
         db.categories.Add(category);
         db.SaveChanges();
     }
 }
Esempio n. 5
0
 public void Deletecategory(int ID)
 {
     using (var db = new EStoreContext())
     {
         var catData = db.categories.Find(ID);
         db.categories.Remove(catData);
         db.SaveChanges();
     }
 }
        //Landing Page for Each Store in Que
        public static TemplateThemeIndex GetEstoreIndex()
        {
            EStoreContext db = new EStoreContext();
            //ApplicationDbContext app_Db = new ApplicationDbContext();

            TemplateThemeIndex setup = new TemplateThemeIndex();

            var Title = db.SEOModels.Where(x => x.Id == x.Id);

            setup.Title = Title.ToString();

            return(setup);
        }