예제 #1
0
        public PersonBlTest()
        {
            DtoMappers.Init();

            _personDto = new PersonDto();
            _personRepository = A.Fake<IPersonRepository>();
            _uow = new UnitOfWorkTest {PersonRepository = _personRepository};

            _person = new Person
            {
                Id = PersonId,
                Age = 20,
                FirstName = "First",
                LastName = "Last",
                Sex = true
            };
        }
예제 #2
0
 public void Update(PersonDto personDto)
 {
     Uow.PersonRepository.Update(FromModelToEntity(personDto));
 }
예제 #3
0
 public void Insert(PersonDto personDto)
 {
     Uow.PersonRepository.Insert(FromModelToEntity(personDto));
 }
예제 #4
0
 internal Person FromModelToEntity(PersonDto personDto)
 {
     var person = Mapper.Map<Person>(personDto);
     return person;
 }