public IActionResult GetById(int id) { using (var scope = _tracer.BuildSpan(spanName).StartActive(true)) { var result = _usersLogic.GetById(id); scope.LogResult("Get user by id", result); return(Ok(result)); } }
public User GetUserById(int id) { var user = new User(); try { user = _userLogic.GetById(id); } catch (SqlException ex) { Logger.LogShortErrorInfo(ex); return(null); } return(user); }
public IActionResult GetSingleUser(int id) { var result = _usersLogic.GetById(id); return(Ok(result)); }