Ejemplo n.º 1
0
        public async Task <IActionResult> GetLeaveTypes()
        {
            try
            {
                var leaveTypes = await leaveTypeService.GetAllLeaveType();

                if (leaveTypes == null)
                {
                    return(NotFound());
                }
                return(Ok(leaveTypes));
            }
            catch (Exception)
            {
                return(BadRequest());
            }
        }
Ejemplo n.º 2
0
 public ActionResult <IEnumerable <LeaveType> > GetAllLeaveType()
 {
     return(_LeaveTypeService.GetAllLeaveType());
 }