public virtual BOPosts MapModelToBO( int id, ApiPostsRequestModel model ) { BOPosts boPosts = new BOPosts(); boPosts.SetProperties( id, model.AcceptedAnswerId, model.AnswerCount, model.Body, model.ClosedDate, model.CommentCount, model.CommunityOwnedDate, model.CreationDate, model.FavoriteCount, model.LastActivityDate, model.LastEditDate, model.LastEditorDisplayName, model.LastEditorUserId, model.OwnerUserId, model.ParentId, model.PostTypeId, model.Score, model.Tags, model.Title, model.ViewCount); return(boPosts); }
public virtual BOPosts MapEFToBO( Posts ef) { var bo = new BOPosts(); bo.SetProperties( ef.Id, ef.AcceptedAnswerId, ef.AnswerCount, ef.Body, ef.ClosedDate, ef.CommentCount, ef.CommunityOwnedDate, ef.CreationDate, ef.FavoriteCount, ef.LastActivityDate, ef.LastEditDate, ef.LastEditorDisplayName, ef.LastEditorUserId, ef.OwnerUserId, ef.ParentId, ef.PostTypeId, ef.Score, ef.Tags, ef.Title, ef.ViewCount); return(bo); }
public virtual Posts MapBOToEF( BOPosts bo) { Posts efPosts = new Posts(); efPosts.SetProperties( bo.AcceptedAnswerId, bo.AnswerCount, bo.Body, bo.ClosedDate, bo.CommentCount, bo.CommunityOwnedDate, bo.CreationDate, bo.FavoriteCount, bo.Id, bo.LastActivityDate, bo.LastEditDate, bo.LastEditorDisplayName, bo.LastEditorUserId, bo.OwnerUserId, bo.ParentId, bo.PostTypeId, bo.Score, bo.Tags, bo.Title, bo.ViewCount); return(efPosts); }
public virtual ApiPostsResponseModel MapBOToModel( BOPosts boPosts) { var model = new ApiPostsResponseModel(); model.SetProperties(boPosts.Id, boPosts.AcceptedAnswerId, boPosts.AnswerCount, boPosts.Body, boPosts.ClosedDate, boPosts.CommentCount, boPosts.CommunityOwnedDate, boPosts.CreationDate, boPosts.FavoriteCount, boPosts.LastActivityDate, boPosts.LastEditDate, boPosts.LastEditorDisplayName, boPosts.LastEditorUserId, boPosts.OwnerUserId, boPosts.ParentId, boPosts.PostTypeId, boPosts.Score, boPosts.Tags, boPosts.Title, boPosts.ViewCount); return(model); }