public virtual PostTypes MapBOToEF(
            BOPostTypes bo)
        {
            PostTypes efPostTypes = new PostTypes();

            efPostTypes.SetProperties(
                bo.Id,
                bo.Type);
            return(efPostTypes);
        }
Esempio n. 2
0
        public void MapEFToBO()
        {
            var       mapper = new DALPostTypesMapper();
            PostTypes entity = new PostTypes();

            entity.SetProperties(1, "A");

            BOPostTypes response = mapper.MapEFToBO(entity);

            response.Id.Should().Be(1);
            response.Type.Should().Be("A");
        }
Esempio n. 3
0
        public void MapEFToBOList()
        {
            var       mapper = new DALPostTypesMapper();
            PostTypes entity = new PostTypes();

            entity.SetProperties(1, "A");

            List <BOPostTypes> response = mapper.MapEFToBO(new List <PostTypes>()
            {
                entity
            });

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