コード例 #1
0
ファイル: PersonBlTest.cs プロジェクト: andreist/MvcDemo
        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
ファイル: PersonBl.cs プロジェクト: andreist/MvcDemo
 public void Update(PersonDto personDto)
 {
     Uow.PersonRepository.Update(FromModelToEntity(personDto));
 }
コード例 #3
0
ファイル: PersonBl.cs プロジェクト: andreist/MvcDemo
 public void Insert(PersonDto personDto)
 {
     Uow.PersonRepository.Insert(FromModelToEntity(personDto));
 }
コード例 #4
0
ファイル: PersonBl.cs プロジェクト: andreist/MvcDemo
 internal Person FromModelToEntity(PersonDto personDto)
 {
     var person = Mapper.Map<Person>(personDto);
     return person;
 }