public void UpdateExaminador(SL.DTO.ExaminadorDTO examinadorDto) { //mapeamos var entity = ModelMapper.ExaminadorMapper.DtoToEntity(examinadorDto); //actualizamos a través de la DAL this.dataAccess.ExaminadorDAO.Update(entity); }
public void AddExaminador(SL.DTO.ExaminadorDTO examinadorDto) { //mapeamos var entity = ModelMapper.ExaminadorMapper.DtoToEntity(examinadorDto); //creamos a través de la DAL this.dataAccess.ExaminadorDAO.Create(entity); }
public static DAL.Entities.Examinador DtoToEntity(SL.DTO.ExaminadorDTO dto) { DAL.Entities.Examinador entity = new DAL.Entities.Examinador(); //entity = AutoMapper.Mapper.Map<SL.DTO.ExaminadorDTO, DAL.Entities.Examinador>(dto); entity.Id = dto.Id; entity.Rut = dto.Rut; entity.RutDv = dto.RutDv; entity.Name = dto.Name; entity.LastName = dto.LastName; entity.Birthdate = dto.Birthdate; entity.Sex = dto.Sex; entity.Cellphone = dto.Cellphone; entity.PaymentAmount = dto.PaymentAmount; entity.Address = dto.Address; entity.ComunaId = dto.ComunaId; entity.Email = dto.Email; return(entity); }
public static SL.DTO.ExaminadorDTO EntityToDto(DAL.Entities.Examinador entity) { SL.DTO.ExaminadorDTO dto = new SL.DTO.ExaminadorDTO(); //dto = AutoMapper.Mapper.Map<DAL.Entities.Examinador, SL.DTO.ExaminadorDTO>(entity); dto.Id = entity.Id; dto.Rut = entity.Rut; dto.RutDv = entity.RutDv; dto.Name = entity.Name; dto.LastName = entity.LastName; dto.Birthdate = entity.Birthdate; dto.Sex = entity.Sex; dto.Cellphone = entity.Cellphone; dto.PaymentAmount = entity.PaymentAmount; dto.Address = entity.Address; dto.ComunaId = entity.ComunaId; dto.Email = entity.Email; return(dto); }