public virtual PostHistoryType MapBOToEF(
            BOPostHistoryType bo)
        {
            PostHistoryType efPostHistoryType = new PostHistoryType();

            efPostHistoryType.SetProperties(
                bo.Id,
                bo.Type);
            return(efPostHistoryType);
        }
Ejemplo n.º 2
0
        public void MapEntityToModel()
        {
            var             mapper = new DALPostHistoryTypeMapper();
            PostHistoryType item   = new PostHistoryType();

            item.SetProperties(1, "A");
            ApiPostHistoryTypeServerResponseModel response = mapper.MapEntityToModel(item);

            response.Id.Should().Be(1);
            response.RwType.Should().Be("A");
        }
Ejemplo n.º 3
0
        public virtual PostHistoryType MapModelToEntity(
            int id,
            ApiPostHistoryTypeServerRequestModel model
            )
        {
            PostHistoryType item = new PostHistoryType();

            item.SetProperties(
                id,
                model.RwType);
            return(item);
        }
        public void MapEFToBO()
        {
            var             mapper = new DALPostHistoryTypeMapper();
            PostHistoryType entity = new PostHistoryType();

            entity.SetProperties(1, "A");

            BOPostHistoryType response = mapper.MapEFToBO(entity);

            response.Id.Should().Be(1);
            response.Type.Should().Be("A");
        }
Ejemplo n.º 5
0
        public void MapEntityToModelList()
        {
            var             mapper = new DALPostHistoryTypeMapper();
            PostHistoryType item   = new PostHistoryType();

            item.SetProperties(1, "A");
            List <ApiPostHistoryTypeServerResponseModel> response = mapper.MapEntityToModel(new List <PostHistoryType>()
            {
                { item }
            });

            response.Count.Should().Be(1);
        }
        public void MapEFToBOList()
        {
            var             mapper = new DALPostHistoryTypeMapper();
            PostHistoryType entity = new PostHistoryType();

            entity.SetProperties(1, "A");

            List <BOPostHistoryType> response = mapper.MapEFToBO(new List <PostHistoryType>()
            {
                entity
            });

            response.Count.Should().Be(1);
        }