示例#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);
        }