public GetAllShiftListResponse GetAllShiftList() { GetAllShiftListResponse response = new GetAllShiftListResponse(); try { var GetAllShiftList = context.TblFmShiftRepository.Get().ToList(); if (GetAllShiftList != null && GetAllShiftList.Count > 0) { response.isSuccess = true; response.GetAllShiftList = GetAllShiftList; } else { response.isSuccess = false; response.GetAllShiftList = null; response.ErrorMessage = "Hata oluştu tekrar deneyiniz!"; } } catch (Exception) { response.isSuccess = false; response.GetAllShiftList = null; response.ErrorMessage = "Hata oluştu tekrar deneyiniz!"; } return(response); }
public async Task <IActionResult> GetAllShiftList() { GetAllShiftListResponse response = _iPP_OTService.GetAllShiftList(); return(Ok(response)); }