Пример #1
0
        public EmployeeViewModel MyProfile()
        {
            int?     id = User.GetAccountId();
            Employee existingEmployee = _employeeService.Get(id.HasValue ? id.Value : -1);

            return(EmployeeAdapter.ToViewModel(existingEmployee));
        }
Пример #2
0
        public IEnumerable <EmployeeViewModel> Get()
        {
            var EmployeeViewModelList = new List <EmployeeViewModel>();

            foreach (Employee employee in  _employeeService.GetAll())
            {
                EmployeeViewModelList.Add(EmployeeAdapter.ToViewModel(employee));
            }
            return(EmployeeViewModelList);
        }