public async Task <GetConfigEmailForViewDto> GetConfigEmailForView(int id) { var configEmail = await _configEmailRepository.GetAsync(id); var output = new GetConfigEmailForViewDto { ConfigEmail = ObjectMapper.Map <ConfigEmailDto>(configEmail) }; return(output); }
public async Task <GetConfigEmailForViewDto> GetConfigEmailByTenCtyForView(string tenCongty) { var configEmail = await _configEmailRepository.FirstOrDefaultAsync(x => x.TenCTY.ToUpper().Equals(tenCongty.ToUpper())); var output = new GetConfigEmailForViewDto { ConfigEmail = ObjectMapper.Map <ConfigEmailDto>(configEmail) }; return(output); }