示例#1
0
        public void Edit(TeammateDTO teammate)
        {
            var mapper = new MapperConfiguration(cfg =>
            {
                cfg.CreateMap <TeammateDTO, Teammate>();
            }).CreateMapper();

            _unitOfWork.Teammates.Update(mapper.Map <TeammateDTO, Teammate>(teammate));
        }
示例#2
0
        public void AddUsers(PersonDTO person, ProjectDTO project)
        {
            TeammateDTO teammateDTO = new TeammateDTO()
            {
                IdPerson  = person.Id,
                IdProject = project.Id
            };
            var mapper = new MapperConfiguration(cfg =>
            {
                cfg.CreateMap <TeammateDTO, Teammate>();
            }).CreateMapper();

            Database.Teammates.Create(mapper.Map <TeammateDTO, Teammate>(teammateDTO));
        }