예제 #1
0
        public IActionResult GetById(int userId)
        {
            User user = _context.Find <User>(userId);

            if (user != null)
            {
                return(Ok(user));
            }

            return(NotFound());
        }
예제 #2
0
 public T GetById(int id) => context.Find(typeof(T), id) as T;