public async Task <IActionResult> GetLeaveTypes() { try { var leaveTypes = await leaveTypeService.GetAllLeaveType(); if (leaveTypes == null) { return(NotFound()); } return(Ok(leaveTypes)); } catch (Exception) { return(BadRequest()); } }
public ActionResult <IEnumerable <LeaveType> > GetAllLeaveType() { return(_LeaveTypeService.GetAllLeaveType()); }