public void Delete(int Idx) { using (GalleryDataContext context = new GalleryDataContext(Settings.ConnectionString)) { context.CommandTimeout = Settings.CommandTimeout; context.DeferredLoadingEnabled = false; Gallery_Topic topic_obj = context.Gallery_Topics.Single(p => p.Gallery_TopicId == Idx); context.Gallery_Topics.DeleteOnSubmit(topic_obj); context.SubmitChanges(); } }
public static int?InsertData(Gallery_Topic entity) { using (GalleryDataContext context = new GalleryDataContext(Settings.ConnectionString)) { int? o_return = 0; string UserLog = Convert.ToString(entity.UserLog); var q = context.Gallery_Topics_Insert(UserLog, IP, entity.Gallery_TopicName, entity.Alias, entity.ParentId, entity.Description, entity.Status, ref o_return); context.SubmitChanges(); return(o_return); } }
partial void UpdateGallery_Topic(Gallery_Topic instance);
partial void DeleteGallery_Topic(Gallery_Topic instance);
partial void InsertGallery_Topic(Gallery_Topic instance);