예제 #1
0
		public void MapEntityToModelList()
		{
			var mapper = new DALVPersonMapper();
			VPerson item = new VPerson();
			item.SetProperties(1, "A");
			List<ApiVPersonServerResponseModel> response = mapper.MapEntityToModel(new List<VPerson>() { { item} });

			response.Count.Should().Be(1);
		}
예제 #2
0
        public virtual VPerson MapBOToEF(
            BOVPerson bo)
        {
            VPerson efVPerson = new VPerson();

            efVPerson.SetProperties(
                bo.PersonId,
                bo.PersonName);
            return(efVPerson);
        }
예제 #3
0
		public void MapEntityToModel()
		{
			var mapper = new DALVPersonMapper();
			VPerson item = new VPerson();
			item.SetProperties(1, "A");
			ApiVPersonServerResponseModel response = mapper.MapEntityToModel(item);

			response.PersonId.Should().Be(1);
			response.PersonName.Should().Be("A");
		}
예제 #4
0
        public void MapEFToBO()
        {
            var     mapper = new DALVPersonMapper();
            VPerson entity = new VPerson();

            entity.SetProperties(1, "A");

            BOVPerson response = mapper.MapEFToBO(entity);

            response.PersonId.Should().Be(1);
            response.PersonName.Should().Be("A");
        }
예제 #5
0
        public virtual VPerson MapModelToEntity(
            int personId,
            ApiVPersonServerRequestModel model
            )
        {
            VPerson item = new VPerson();

            item.SetProperties(
                personId,
                model.PersonName);
            return(item);
        }
예제 #6
0
        public void MapEFToBOList()
        {
            var     mapper = new DALVPersonMapper();
            VPerson entity = new VPerson();

            entity.SetProperties(1, "A");

            List <BOVPerson> response = mapper.MapEFToBO(new List <VPerson>()
            {
                entity
            });

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