public static ThreadObject UpdateAccordingWith(this ThreadObject threadObject, Thread thread) { threadObject.Subject = thread.Subject; threadObject.Body = thread.Body; threadObject.TotalViews = thread.TotalViews; threadObject.TotalPosts = thread.TotalPosts; threadObject.StickDate = thread.StickDate; threadObject.Status = thread.Status; threadObject.SectionId = thread.SectionId; threadObject.AuthorId = thread.AuthorId; threadObject.CreateDate = thread.CreateDate; threadObject.UpdateDate = thread.UpdateDate; threadObject.Marks = thread.Marks; threadObject.ReleaseStatus = thread.ReleaseStatus; threadObject.MostRecentReplierId = thread.MostRecentReplierId; return(threadObject); }
public static Thread ToThread(this ThreadObject threadObject) { return(new Thread( threadObject.Id, threadObject.SectionId, threadObject.AuthorId, threadObject.CreateDate, threadObject.Marks, threadObject.ReleaseStatus, threadObject.TotalPosts, threadObject.MostRecentReplierId, threadObject.UpdateDate) { Subject = threadObject.Subject, Body = threadObject.Body, TotalViews = threadObject.TotalViews, StickDate = threadObject.StickDate, Status = threadObject.Status }); }