Пример #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());
            }
        }
Пример #2
0
 public ActionResult <IEnumerable <LeaveType> > GetAllLeaveType()
 {
     return(_LeaveTypeService.GetAllLeaveType());
 }