public IActionResult GetOverTime(int OverTimeId) { if (!_OverTimeRepository.OverTimeExsist(OverTimeId)) { return(NotFound("Over Time Doesn't Exsist")); } var OverTime = _OverTimeRepository.GetOverTime(OverTimeId); if (!ModelState.IsValid) { return(BadRequest(ModelState)); } return(Ok(OverTime)); }