예제 #1
0
        public virtual ApiPostLinksResponseModel MapBOToModel(
            BOPostLinks boPostLinks)
        {
            var model = new ApiPostLinksResponseModel();

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

            return(model);
        }
        public virtual BOPostLinks MapEFToBO(
            PostLinks ef)
        {
            var bo = new BOPostLinks();

            bo.SetProperties(
                ef.Id,
                ef.CreationDate,
                ef.LinkTypeId,
                ef.PostId,
                ef.RelatedPostId);
            return(bo);
        }
        public virtual PostLinks MapBOToEF(
            BOPostLinks bo)
        {
            PostLinks efPostLinks = new PostLinks();

            efPostLinks.SetProperties(
                bo.CreationDate,
                bo.Id,
                bo.LinkTypeId,
                bo.PostId,
                bo.RelatedPostId);
            return(efPostLinks);
        }
예제 #4
0
        public virtual BOPostLinks MapModelToBO(
            int id,
            ApiPostLinksRequestModel model
            )
        {
            BOPostLinks boPostLinks = new BOPostLinks();

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