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 }; }
public void Update(PersonDto personDto) { Uow.PersonRepository.Update(FromModelToEntity(personDto)); }
public void Insert(PersonDto personDto) { Uow.PersonRepository.Insert(FromModelToEntity(personDto)); }
internal Person FromModelToEntity(PersonDto personDto) { var person = Mapper.Map<Person>(personDto); return person; }