public PayorController(IPayorService payorService) { _payorService = payorService; Mapper.CreateMap<PayorDTO, Payor>(); Mapper.CreateMap<Payor, PayorDTO>(); Mapper.CreateMap<List<Payor>, List<PayorDTO>>(); }
public PayorController(IPayorService payorService) { _payorService = payorService; Mapper.CreateMap <PayorDTO, Payor>(); Mapper.CreateMap <Payor, PayorDTO>(); Mapper.CreateMap <List <Payor>, List <PayorDTO> >(); }
public EmployeeController(IPayorService payorService, IEmployeeService employeeService) { _payorService = payorService; _employeeService = employeeService; Mapper.CreateMap <EmployeeDTO, Employee>() .AfterMap( (src, dest) => dest.Payors = _payorService.FindBy(t => t.Id == src.PayorId) ); Mapper.CreateMap <Employee, EmployeeDTO>() .AfterMap( (src, dest) => dest.PayorId = src.Payors.Id ); Mapper.CreateMap <List <Employee>, List <EmployeeDTO> >(); }
public EmployeeController(IPayorService payorService, IEmployeeService employeeService) { _payorService = payorService; _employeeService = employeeService; Mapper.CreateMap<EmployeeDTO, Employee>() .AfterMap( (src, dest) => dest.Payors = _payorService.FindBy(t => t.Id == src.PayorId) ); Mapper.CreateMap<Employee, EmployeeDTO>() .AfterMap( (src, dest) => dest.PayorId = src.Payors.Id ); Mapper.CreateMap<List<Employee>, List<EmployeeDTO>>(); }
public UserController(IPayorService payorService, IUserService userService) { _payorService = payorService; _userService = userService; Mapper.CreateMap <UserDTO, User>() .AfterMap( (src, dest) => dest.Payor = _payorService.FindBy(t => t.Id == src.PayorId) ); Mapper.CreateMap <UserInputDTO, User>() .AfterMap( (src, dest) => dest.Payor = _payorService.FindBy(t => t.Id == src.PayorId) ); Mapper.CreateMap <User, UserDTO>() .AfterMap( (src, dest) => dest.PayorId = src.Payor.Id ); Mapper.CreateMap <List <User>, List <UserDTO> >(); }
public UserController(IPayorService payorService, IUserService userService) { _payorService = payorService; _userService = userService; Mapper.CreateMap<UserDTO, User>() .AfterMap( (src, dest) => dest.Payor = _payorService.FindBy(t => t.Id == src.PayorId) ); Mapper.CreateMap<UserInputDTO, User>() .AfterMap( (src, dest) => dest.Payor = _payorService.FindBy(t => t.Id == src.PayorId) ); Mapper.CreateMap<User, UserDTO>() .AfterMap( (src, dest) => dest.PayorId = src.Payor.Id ); Mapper.CreateMap<List<User>, List<UserDTO>>(); }