public async Task <IActionResult> GetById(int id) { var user = await _context.Users.FirstOrDefaultAsync(u => u.Id.Equals(id)); if (user == null) { return(NotFound(nameof(user))); } return(Ok(UserResource.GetUserResource(user))); }