コード例 #1
0
        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();
        }
コード例 #2
0
 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;
 }