コード例 #1
0
        public virtual ApiCommentResponseModel MapBOToModel(
            BOComment boComment)
        {
            var model = new ApiCommentResponseModel();

            model.SetProperties(boComment.Id, boComment.CreationDate, boComment.PostId, boComment.Score, boComment.Text, boComment.UserId);

            return(model);
        }
コード例 #2
0
        public virtual BOComment MapEFToBO(
            Comment ef)
        {
            var bo = new BOComment();

            bo.SetProperties(
                ef.Id,
                ef.CreationDate,
                ef.PostId,
                ef.Score,
                ef.Text,
                ef.UserId);
            return(bo);
        }
コード例 #3
0
        public virtual Comment MapBOToEF(
            BOComment bo)
        {
            Comment efComment = new Comment();

            efComment.SetProperties(
                bo.CreationDate,
                bo.Id,
                bo.PostId,
                bo.Score,
                bo.Text,
                bo.UserId);
            return(efComment);
        }
コード例 #4
0
        public virtual BOComment MapModelToBO(
            int id,
            ApiCommentRequestModel model
            )
        {
            BOComment boComment = new BOComment();

            boComment.SetProperties(
                id,
                model.CreationDate,
                model.PostId,
                model.Score,
                model.Text,
                model.UserId);
            return(boComment);
        }