예제 #1
0
        public void RemoveSubforum(int subforumID)
        {
            SubForum subforum = (from s in context.SubForum where s.subforum_ID == subforumID select s).SingleOrDefault();

            foreach (var item in context.Thread)
            {
                if (item.in_subforum == subforum.subforum_ID)
                {
                    RemoveThread(item.thread_ID);
                }
            }
            context.SubForum.Remove(subforum);
            context.SaveChanges();
        }
예제 #2
0
 public void EditSubforum(SubForum subforum)
 {
     throw new NotImplementedException();
 }
예제 #3
0
 public void createSubforum(SubForum subforum)
 {
     context.SubForum.Add(subforum);
     context.SaveChanges();
 }