public virtual SpaceFeature MapBOToEF(
            BOSpaceFeature bo)
        {
            SpaceFeature efSpaceFeature = new SpaceFeature();

            efSpaceFeature.SetProperties(
                bo.Id,
                bo.Name);
            return(efSpaceFeature);
        }
        public void MapEntityToModel()
        {
            var          mapper = new DALSpaceFeatureMapper();
            SpaceFeature item   = new SpaceFeature();

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

            response.Id.Should().Be(1);
            response.Name.Should().Be("A");
        }
        public virtual SpaceFeature MapModelToEntity(
            int id,
            ApiSpaceFeatureServerRequestModel model
            )
        {
            SpaceFeature item = new SpaceFeature();

            item.SetProperties(
                id,
                model.Name);
            return(item);
        }
        public void MapEFToBO()
        {
            var          mapper = new DALSpaceFeatureMapper();
            SpaceFeature entity = new SpaceFeature();

            entity.SetProperties(1, "A");

            BOSpaceFeature response = mapper.MapEFToBO(entity);

            response.Id.Should().Be(1);
            response.Name.Should().Be("A");
        }
        public void MapEntityToModelList()
        {
            var          mapper = new DALSpaceFeatureMapper();
            SpaceFeature item   = new SpaceFeature();

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

            response.Count.Should().Be(1);
        }
Esempio n. 6
0
        public void MapEFToBOList()
        {
            var          mapper = new DALSpaceFeatureMapper();
            SpaceFeature entity = new SpaceFeature();

            entity.SetProperties(1, "A", 1);

            List <BOSpaceFeature> response = mapper.MapEFToBO(new List <SpaceFeature>()
            {
                entity
            });

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