public IActionResult Get(int id) { _log4net.Info("Get by id is called!"); if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var tempbill = _context.GetBillById(id); _log4net.Info("Data of the id returned!"); if (tempbill == null) { return(NotFound()); } return(Ok(tempbill)); }