示例#1
0
        public virtual ApiTagResponseModel MapBOToModel(
            BOTag boTag)
        {
            var model = new ApiTagResponseModel();

            model.SetProperties(boTag.Id, boTag.Count, boTag.ExcerptPostId, boTag.TagName, boTag.WikiPostId);

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

            bo.SetProperties(
                ef.Id,
                ef.Count,
                ef.ExcerptPostId,
                ef.TagName,
                ef.WikiPostId);
            return(bo);
        }
示例#3
0
        public virtual Tag MapBOToEF(
            BOTag bo)
        {
            Tag efTag = new Tag();

            efTag.SetProperties(
                bo.Count,
                bo.ExcerptPostId,
                bo.Id,
                bo.TagName,
                bo.WikiPostId);
            return(efTag);
        }
示例#4
0
        public virtual BOTag MapModelToBO(
            int id,
            ApiTagRequestModel model
            )
        {
            BOTag boTag = new BOTag();

            boTag.SetProperties(
                id,
                model.Count,
                model.ExcerptPostId,
                model.TagName,
                model.WikiPostId);
            return(boTag);
        }