public bool DeleteImageGallery(imagegallery obj) { try { imagegallery objimagegallery = dbcontext.imagegalleries.Where(t => t.imageid == obj.imageid).FirstOrDefault(); dbcontext.imagegalleries.DeleteOnSubmit(objimagegallery); dbcontext.SubmitChanges(); return true; } catch (Exception) { return false; } }
public bool UpdateImageGalleryWithoutImage(imagegallery obj) { try { imagegallery objimagegallery = dbcontext.imagegalleries.Where(t => t.imageid == obj.imageid).FirstOrDefault(); objimagegallery.eventid = obj.eventid; objimagegallery.postdate = obj.postdate; return true; } catch (Exception) { return false; } }
public bool InsertImageGallery(imagegallery obj) { try { dbcontext.imagegalleries.InsertOnSubmit(obj); dbcontext.SubmitChanges(); return true; } catch (Exception) { return false; } }
partial void Deleteimagegallery(imagegallery instance);
partial void Updateimagegallery(imagegallery instance);
partial void Insertimagegallery(imagegallery instance);