// подключил
using IslandCity.Models;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using IslandCity.App_Data;
using Microsoft.AspNetCore.Http;
using Newtonsoft.Json;
using Microsoft.EntityFrameworkCore;
User user = db.Users
.Include(context => context.Lands)
.ThenInclude(land => land.Card)
.Include(context => context.Cards)
.FirstOrDefault(u => u.Name == accountName);SELECT [t].[ID], [t].[Money], [t].[Name], [t].[Profit], [t0].[ID], [t0].[CardID], [t0].[CardID1], [t0].[CoordX], [t0].[CoordY], [t0].[Type], [t0].[UserID], [t0].[ID0], [t0].[CardSkinID], [t0].[CardTypeID], [t0].[LandID], [t0].[Profit], [t0].[UserID0], [c0].[ID], [c0].[CardSkinID], [c0].[CardTypeID], [c0].[LandID], [c0].[Profit], [c0].[UserID]
FROM (
SELECT TOP(1) [u].[ID], [u].[Money], [u].[Name], [u].[Profit]
FROM [Users] AS [u]
WHERE [u].[Name] = @__acc_0
) AS [t]
LEFT JOIN (
SELECT [l].[ID], [l].[CardID], [l].[CardID1], [l].[CoordX], [l].[CoordY], [l].[Type], [l].[UserID], [c].[ID] AS [ID0], [c].[CardSkinID], [c].[CardTypeID], [c].[LandID], [c].[Profit], [c].[UserID] AS [UserID0]
FROM [Lands] AS [l]
LEFT JOIN [Cards] AS [c] ON [l].[CardID1] = [c].[ID]
) AS [t0] ON [t].[ID] = [t0].[UserID]
LEFT JOIN [Cards] AS [c0] ON [t].[ID] = [c0].[UserID]
ORDER BY [t].[ID], [t0].[ID], [t0].[ID0], [c0].[ID] [Table("Lands")]
public class Land : BaseModel
{
public int CoordX { get; set; }
public int CoordY { get; set; }
public int Type { get; set; }
public int UserID { get; set; }
//public User User { get; set; }
public int? CardID { get; set; }
public Card Card { get; set; }
}