Beispiel #1
0
 partial void DeleteGalleryCategory(GalleryCategory instance);
Beispiel #2
0
 partial void InsertGalleryCategory(GalleryCategory instance);
Beispiel #3
0
 partial void UpdateGalleryCategory(GalleryCategory instance);
Beispiel #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;
        }