public bool commitInsert(string _imageFile, string _FileName) { //create an insteance of the data context class called objGalleryImageDC NorthBayDataContext objGalleryImageDC = new NorthBayDataContext(); //to ensure all data will be disposed when finished using (objGalleryImageDC) { //create an instance of the table ImageClass objNewGalleryImage = new ImageClass(); //set table column to new values being passed from *.aspx card_image //objNewCardImage.id = _id; objNewGalleryImage.FilePath = _imageFile; objNewGalleryImage.FileName = _FileName; //insert command objGalleryImageDC.ImageClasses.InsertOnSubmit(objNewGalleryImage); //commit insert against db objGalleryImageDC.SubmitChanges(); return true; } }
partial void DeleteImageClass(ImageClass instance);
partial void UpdateImageClass(ImageClass instance);
partial void InsertImageClass(ImageClass instance);