public IActionResult Get() { try { _log4net.Info("Get All is accessed"); var t = _resultRepository.GetAll(); if (t != null) { _log4net.Info("All information fetched."); return(new OkObjectResult(t)); } _log4net.Info("Unable to fetch all details"); return(new NoContentResult()); } catch { _log4net.Error("Error in getting all details"); return(new BadRequestResult()); } }