public async Task <IActionResult> Get() { // var userId = User.FindFirst(ClaimTypes.NameIdentifier).Value; var email = User.FindFirst(ClaimTypes.NameIdentifier).Value; var user = _context.Users .Where(x => x.Email == email) .Include(x => x.AvailableVehicles) .FirstOrDefault(); // var user = await _userManager.FindByEmailAsync(userId); var obj = new LoggedInUser(); obj.email = user.Email; // obj.defaultvehicle = user.DefaultVehicle; obj.AvailableVehicles = user.AvailableVehicles; return(Ok(obj)); }