partial void DeleteGalleryCategory(GalleryCategory instance);
partial void InsertGalleryCategory(GalleryCategory instance);
partial void UpdateGalleryCategory(GalleryCategory instance);
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; }