Exemple #1
0
        public IActionResult Index()
        {
            var model = _empRepository.GetAllEmployees()
                        .Select(t =>
                                new Employee
            {
                Id         = t.Id,
                Name       = t.Name,
                Email      = t.EmailId,
                Department = (KudVenvat1.Models.Dept)t.Department,
                PhotoPath  = t.PhotoPath
            });

            return(View(model));
        }
Exemple #2
0
        public IEnumerable <EmployeeInfo> GetAllEmployees()
        {
            IEnumerable <Employee> employees = _repository.GetAllEmployees();

            foreach (var employee in employees)
            {
                _dtoEmployeeInfo.Add(GetAtributes(employee));
            }
            return(_dtoEmployeeInfo);
        }