public PracticeAreaAddEditModel(PracticeArea practiceArea) { this.ID = practiceArea.ID; this.Name = practiceArea.Name; this.CreationDate = practiceArea.CreationDate; }
public ArticleAddEditModel(Article article, List <ArticlePiece> articlePieces, Contributor contributor, PracticeArea practiceArea) { this.ID = article.ID; this.title = article.Title; this.contributorID = article.ContributorID; this.practiceAreaID = article.PracticeAreaID; this.preview = article.BodyPreview; this.paragraphs = new List <ArticleParagraphRow>(); foreach (ArticlePiece piece in articlePieces) { this.paragraphs.Add(new ArticleParagraphRow() { ID = piece.ID, content = piece.Paragraph, imagePosition = piece.GetImageString(piece.ImagePosition), imageURL = piece.ImageUrl, title = piece.Title }); } this.tags = article.Tags; this.contributor = contributor; this.practiceArea = practiceArea; this.CreationDate = article.CreationDate; }