示例#1
0
        public virtual ApiPostLinkResponseModel MapBOToModel(
            BOPostLink boPostLink)
        {
            var model = new ApiPostLinkResponseModel();

            model.SetProperties(boPostLink.Id, boPostLink.CreationDate, boPostLink.LinkTypeId, boPostLink.PostId, boPostLink.RelatedPostId);

            return(model);
        }
示例#2
0
        public virtual BOPostLink MapEFToBO(
            PostLink ef)
        {
            var bo = new BOPostLink();

            bo.SetProperties(
                ef.Id,
                ef.CreationDate,
                ef.LinkTypeId,
                ef.PostId,
                ef.RelatedPostId);
            return(bo);
        }
示例#3
0
        public virtual PostLink MapBOToEF(
            BOPostLink bo)
        {
            PostLink efPostLink = new PostLink();

            efPostLink.SetProperties(
                bo.CreationDate,
                bo.Id,
                bo.LinkTypeId,
                bo.PostId,
                bo.RelatedPostId);
            return(efPostLink);
        }
示例#4
0
        public virtual BOPostLink MapModelToBO(
            int id,
            ApiPostLinkRequestModel model
            )
        {
            BOPostLink boPostLink = new BOPostLink();

            boPostLink.SetProperties(
                id,
                model.CreationDate,
                model.LinkTypeId,
                model.PostId,
                model.RelatedPostId);
            return(boPostLink);
        }