Exemplo n.º 1
0
        public HttpResponseMessage Get()
        {
            var employees = EmployeesRepository.GetAllEmployees();
            HttpResponseMessage responce = Request.CreateResponse(HttpStatusCode.OK, employees);

            return(responce);
        }
Exemplo n.º 2
0
        public IActionResult GetAllEmployees()
        {
            var employees   = _repository.GetAllEmployees();
            var noEmployees = !employees.Any();

            if (noEmployees)
            {
                return(NotFound("There are currently no employees."));
            }
            return(Ok(employees));
        }
Exemplo n.º 3
0
 public List <EmployeeModel> Get()
 {
     return(employeeRepo.GetAllEmployees());
 }
Exemplo n.º 4
0
 //GET: Employees
 public ActionResult Index()
 {
     return(View(EmployeeRepo.GetAllEmployees()));
 }
        public ActionResult GetAllRecords()
        {
            var result = repository.GetAllEmployees();

            return(View());
        }