Пример #1
0
 partial void DeleteGalleryCategory(GalleryCategory instance);
Пример #2
0
 partial void InsertGalleryCategory(GalleryCategory instance);
Пример #3
0
 partial void UpdateGalleryCategory(GalleryCategory instance);
Пример #4
0
        public int SaveGalleryCategory(string CategoryTitle)
        {
            GalleryCategory gc = db.GalleryCategories.FirstOrDefault(c => c.Title == CategoryTitle);

              if (gc == null)
              {
            gc = new GalleryCategory();
            gc.Title = CategoryTitle;
            db.GalleryCategories.InsertOnSubmit(gc);
            db.SubmitChanges();
              }

              return gc.GalleryCategoryID;
        }