public void UpdateThread(ForumThread thread) { var foundThread = threadsRepo.GetThread(thread.ID); if (foundThread == null) { throw new NullReferenceException($"Thread with id {thread.ID} not found"); } foundThread.Opened = thread.Opened; foundThread.AssignedTo = thread.AssignedTo; threadsRepo.SaveChanges(); }
private static void SynchronizeThreadProperties(RemoteForumThread remoteThread, ForumThread matchedThread) { matchedThread.Link = remoteThread.Link; matchedThread.PostsCount = remoteThread.PostsCount; matchedThread.Title = remoteThread.Title; matchedThread.IsAnswered = remoteThread.IsAnswered; matchedThread.RemoteId = remoteThread.Id; }