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(); }
public void EditSubforum(SubForum subforum) { throw new NotImplementedException(); }
public void createSubforum(SubForum subforum) { context.SubForum.Add(subforum); context.SaveChanges(); }