public IActionResult GetById(int userId) { User user = _context.Find <User>(userId); if (user != null) { return(Ok(user)); } return(NotFound()); }
public T GetById(int id) => context.Find(typeof(T), id) as T;