public List<EmpDto> GetEmps()
{
var empDtoList = new List<EmpDtoList>();
using (_dbContextScopeFactory.Create(connectionString))
{
var empEntity = _empRepository.GetAll();
empDtoList .AddRange(empEntity .Select(x => new EmpDto
{
Id = x.Id,
Name = x.Name,
Description = x.Description,
}));
}
return empDtoList ;
}
{
var empDtoList = new List<EmpDtoList>();
using (_dbContextScopeFactory.Create(connectionString))
{
var empEntity = _empRepository.GetAll();
empDtoList .AddRange(empEntity .Select(x => new EmpDto
{
Id = x.Id,
Name = x.Name,
Description = x.Description,
}));
}
return empDtoList ;
}