periodically at a working restaurant orders are added to the table very slowly.
each addition order lasts from 20 to 30 seconds.
through the resource monitor, i track a transaction that makes more than 1000 requests per second to the database when adding an order.
the query is so long that it does not fit in the message
sql query part1
SELECT [UnionAll5].[Id] AS [C1], [UnionAll5].[Id1] AS [C2], [UnionAll5].[LastUpdateTime] AS [C3], [UnionAll5].[TicketVersion] AS [C4], [UnionAll5].[TicketUid] AS [C5], [UnionAll5].[TicketNumber] AS [C6], [UnionAll5].[Date] AS [C7], [UnionAll5].[LastOrderDate] AS [C8], [UnionAll5].[LastPaymentDate] AS [C9], [UnionAll5].[PreOrder] AS [C10], [UnionAll5].[IsClosed] AS [C11], [UnionAll5].[IsLocked] AS [C12], [UnionAll5].[RemainingAmount] AS [C13], [UnionAll5].[TotalAmount] AS [C14], [UnionAll5].[DepartmentId] AS [C15], [UnionAll5].[TerminalId] AS [C16], [UnionAll5].[TicketTypeId] AS [C17], [UnionAll5].[Note] AS [C18], [UnionAll5].[LastModifiedUserName] AS [C19], [UnionAll5].[TicketTags] AS [C20], [UnionAll5].[TicketStates] AS [C21], [UnionAll5].[TicketLogs] AS [C22], [UnionAll5].[LineSeparators] AS [C23], [UnionAll5].[ExchangeRate] AS [C24], [UnionAll5].[TaxIncluded] AS [C25], [UnionAll5].[Name] AS [C26], [UnionAll5].[Id2] AS [C27], [UnionAll5].[Id3] AS [C28], [UnionAll5].[Date1] AS [C29], [UnionAll5].[DocumentTypeId] AS [C30], [UnionAll5].[Name1] AS [C31], [UnionAll5].[C1] AS [C32], [UnionAll5].[Id4] AS [C33], [UnionAll5].[Id5] AS [C34], [UnionAll5].[TicketId] AS [C35], [UnionAll5].[WarehouseId] AS [C36], [UnionAll5].[DepartmentId1] AS [C37], [UnionAll5].[TerminalId1] AS [C38], [UnionAll5].[MenuItemId] AS [C39], [UnionAll5].[MenuItemName] AS [C40], [UnionAll5].[PortionName] AS [C41], [UnionAll5].[Price] AS [C42], [UnionAll5].[Quantity] AS [C43], [UnionAll5].[PortionCount] AS [C44], [UnionAll5].[Locked] AS [C45], [UnionAll5].[CalculatePrice] AS [C46], [UnionAll5].[DecreaseInventory] AS [C47], [UnionAll5].[IncreaseInventory] AS [C48], [UnionAll5].[OrderNumber] AS [C49], [UnionAll5].[CreatingUserName] AS [C50], [UnionAll5].[CreatedDateTime] AS [C51], [UnionAll5].[LastUpdateDateTime] AS [C52], [UnionAll5].[AccountTransactionTypeId] AS [C53], [UnionAll5].[ProductTimerValueId] AS [C54], [UnionAll5].[GroupTagName] AS [C55], [UnionAll5].[GroupTagFormat] AS [C56], [UnionAll5].[Separator] AS [C57], [UnionAll5].[PriceTag] AS [C58], [UnionAll5].[Tag] AS [C59], [UnionAll5].[DisablePortionSelection] AS [C60], [UnionAll5].[OrderUid] AS [C61], [UnionAll5].[Taxes] AS [C62], [UnionAll5].[OrderTags] AS [C63], [UnionAll5].[OrderStates] AS [C64], [UnionAll5].[TicketId1] AS [C65], [UnionAll5].[Id6] AS [C66], [UnionAll5].[ProductTimerId] AS [C67], [UnionAll5].[PriceType] AS [C68], [UnionAll5].[PriceDuration] AS [C69], [UnionAll5].[MinTime] AS [C70], [UnionAll5].[TimeRounding] AS [C71], [UnionAll5].[Start] AS [C72], [UnionAll5].[End] AS [C73], [UnionAll5].[C2] AS [C74], [UnionAll5].[C3] AS [C75], [UnionAll5].[C4] AS [C76], [UnionAll5].[C5] AS [C77], [UnionAll5].[C6] AS [C78], [UnionAll5].[C7] AS [C79], [UnionAll5].[C8] AS [C80], [UnionAll5].[C9] AS [C81], [UnionAll5].[C10] AS [C82], [UnionAll5].[C11] AS [C83], [UnionAll5].[C12] AS [C84], [UnionAll5].[C13] AS [C85], [UnionAll5].[C14] AS [C86], [UnionAll5].[C15] AS [C87], [UnionAll5].[C16] AS [C88], [UnionAll5].[C17] AS [C89], [UnionAll5].[C18] AS [C90], [UnionAll5].[C19] AS [C91], [UnionAll5].[C20] AS [C92], [UnionAll5].[C21] AS [C93], [UnionAll5].[C22] AS [C94], [UnionAll5].[C23] AS [C95], [UnionAll5].[C24] AS [C96], [UnionAll5].[C25] AS [C97], [UnionAll5].[C26] AS [C98], [UnionAll5].[C27] AS [C99], [UnionAll5].[C28] AS [C100], [UnionAll5].[C29] AS [C101], [UnionAll5].[C30] AS [C102], [UnionAll5].[C31] AS [C103], [UnionAll5].[C32] AS [C104], [UnionAll5].[C33] AS [C105], [UnionAll5].[C34] AS [C106], [UnionAll5].[C35] AS [C107], [UnionAll5].[C36] AS [C108], [UnionAll5].[C37] AS [C109], [UnionAll5].[C38] AS [C110], [UnionAll5].[C39] AS [C111], [UnionAll5].[C40] AS [C112], [UnionAll5].[C41] AS [C113], [UnionAll5].[C42] AS [C114], [UnionAll5].[C43] AS [C115], [UnionAll5].[C44] AS [C116], [UnionAll5].[C45] AS [C117], [UnionAll5].[C46] AS [C118], [UnionAll5].[C47] AS [C119], [UnionAll5].[C48] AS [C120], [UnionAll5].[C49] AS [C121], [UnionAll5].[C50] AS [C122], [UnionAll5].[C51] AS [C123], [UnionAll5].[C52] AS [C124], [UnionAll5].[C53] AS [C125], [UnionAll5].[C54] AS [C126], [UnionAll5].[C55] AS [C127], [UnionAll5].[C56] AS [C128], [UnionAll5].[C57] AS [C129], [UnionAll5].[C58] AS [C130], [UnionAll5].[C59] AS [C131], [UnionAll5].[C60] AS [C132], [UnionAll5].[C61] AS [C133], [UnionAll5].[C62] AS [C134] FROM (SELECT CASE WHEN ([Join2].[Id1] IS NULL) THEN CAST(NULL AS int) ELSE 1 END AS [C1], [Extent1].[Id] AS [Id], [Extent1].[Id] AS [Id1], [Extent1].[LastUpdateTime] AS [LastUpdateTime], [Extent1].[TicketVersion] AS [TicketVersion], [Extent1].[TicketUid] AS [TicketUid], [Extent1].[TicketNumber] AS [TicketNumber], [Extent1].[Date] AS [Date], [Extent1].[LastOrderDate] AS [LastOrderDate], [Extent1].[LastPaymentDate] AS [LastPaymentDate], [Extent1].[PreOrder] AS [PreOrder], [Extent1].[IsClosed] AS [IsClosed], [Extent1].[IsLocked] AS [IsLocked], [Extent1].[RemainingAmount] AS [RemainingAmount], [Extent1].[TotalAmount] AS [TotalAmount], [Extent1].[DepartmentId] AS [DepartmentId], [Extent1].[TerminalId] AS [TerminalId], [Extent1].[TicketTypeId] AS [TicketTypeId], [Extent1].[Note] AS [Note], [Extent1].[LastModifiedUserName] AS [LastModifiedUserName], [Extent1].[TicketTags] AS [TicketTags], [Extent1].[TicketStates] AS [TicketStates], [Extent1].[TicketLogs] AS [TicketLogs], [Extent1].[LineSeparators] AS [LineSeparators], [Extent1].[ExchangeRate] AS [ExchangeRate], [Extent1].[TaxIncluded] AS [TaxIncluded], [Extent1].[Name] AS [Name], [Extent1].[Id] AS [Id2], [Extent2].[Id] AS [Id3], [Extent2].[Date] AS [Date1], [Extent2].[DocumentTypeId] AS [DocumentTypeId], [Extent2].[Name] AS [Name1], [Join2].[Id1] AS [Id4], [Join2].[Id1] AS [Id5], [Join2].[TicketId] AS [TicketId], [Join2].[WarehouseId] AS [WarehouseId], [Join2].[DepartmentId] AS [DepartmentId1], [Join2].[TerminalId] AS [TerminalId1], [Join2].[MenuItemId] AS [MenuItemId], [Join2].[MenuItemName] AS [MenuItemName], [Join2].[PortionName] AS [PortionName], [Join2].[Price] AS [Price], [Join2].[Quantity] AS [Quantity], [Join2].[PortionCount] AS [PortionCount], [Join2].[Locked] AS [Locked], [Join2].[CalculatePrice] AS [CalculatePrice], [Join2].[DecreaseInventory] AS [DecreaseInventory], [Join2].[IncreaseInventory] AS [IncreaseInventory], [Join2].[OrderNumber] AS [OrderNumber], [Join2].[CreatingUserName] AS [CreatingUserName], [Join2].[CreatedDateTime] AS [CreatedDateTime], [Join2].[LastUpdateDateTime] AS [LastUpdateDateTime], [Join2].[AccountTransactionTypeId] AS [AccountTransactionTypeId], [Join2].[ProductTimerValueId] AS [ProductTimerValueId], [Join2].[GroupTagName] AS [GroupTagName], [Join2].[GroupTagFormat] AS [GroupTagFormat], [Join2].[Separator] AS [Separator], [Join2].[PriceTag] AS [PriceTag], [Join2].[Tag] AS [Tag], [Join2].[DisablePortionSelection] AS [DisablePortionSelection], [Join2].[OrderUid] AS [OrderUid], [Join2].[Taxes] AS [Taxes], [Join2].[OrderTags] AS [OrderTags], [Join2].[OrderStates] AS [OrderStates], [Join2].[TicketId] AS [TicketId1], [Join2].[Id2] AS [Id6], [Join2].[ProductTimerId] AS [ProductTimerId], [Join2].[PriceType] AS [PriceType], [Join2].[PriceDuration] AS [PriceDuration], [Join2].[MinTime] AS [MinTime], [Join2].[TimeRounding] AS [TimeRounding], [Join2].[Start] AS [Start], [Join2].[End] AS [End], CAST(NULL AS int) AS [C2], CAST(NULL AS int) AS [C3], CAST(NULL AS int) AS [C4], CAST(NULL AS int) AS [C5], CAST(NULL AS int) AS [C6], CAST(NULL AS varchar(1)) AS [C7], CAST(NULL AS varchar(1)) AS [C8], CAST(NULL AS varchar(1)) AS [C9], CAST(NULL AS int) AS [C10], CAST(NULL AS int) AS [C11], CAST(NULL AS varchar(1)) AS [C12], CAST(NULL AS int) AS [C13], CAST(NULL AS int) AS [C14], CAST(NULL AS int) AS [C15], CAST(NULL AS int) AS [C16], CAST(NULL AS bit) AS [C17], CAST(NULL AS bit) AS [C18], CAST(NULL AS bit) AS [C19], CAST(NULL AS decimal(16,2)) AS [C20], CAST(NULL AS decimal(16,2)) AS [C21], CAST(NULL AS decimal(16,2)) AS [C22], CAST(NULL AS decimal(16,10)) AS [C23], CAST(NULL AS datetime2) AS [C24], CAST(NULL AS varchar(1)) AS [C25], CAST(NULL AS int) AS [C26], CAST(NULL AS int) AS [C27], CAST(NULL AS int) AS [C28], CAST(NULL AS int) AS [C29], CAST(NULL AS int) AS [C30], CAST(NULL AS varchar(1)) AS [C31], CAST(NULL AS varchar(1)) AS [C32], CAST(NULL AS datetime2) AS [C33], CAST(NULL AS int) AS [C34], CAST(NULL AS decimal(16,2)) AS [C35], CAST(NULL AS decimal(16,2)) AS [C36], CAST(NULL AS int) AS [C37], CAST(NULL AS int) AS [C38], CAST(NULL AS decimal(16,10)) AS [C39], CAST(NULL AS varchar(1)) AS [C40], CAST(NULL AS bit) AS [C41], CAST(NULL AS int) AS [C42], CAST(NULL AS int) AS [C43], CAST(NULL AS int) AS [C44], CAST(NULL AS int) AS [C45], CAST(NULL AS varchar(1)) AS [C46], CAST(NULL AS datetime2) AS [C47], CAST(NULL AS int) AS [C48], CAST(NULL AS decimal(16,2)) AS [C49], CAST(NULL AS int) AS [C50], CAST(NULL AS decimal(16,10)) AS [C51], CAST(NULL AS int) AS [C52], CAST(NULL AS int) AS [C53], CAST(NULL AS int) AS [C54], CAST(NULL AS decimal(16,2)) AS [C55], CAST(NULL AS decimal(16,10)) AS [C56], CAST(NULL AS int) AS [C57], CAST(NULL AS int) AS [C58], CAST(NULL AS int) AS [C59], CAST(NULL AS bit) AS [C60], CAST(NULL AS bit) AS [C61], CAST(NULL AS varchar(1)) AS [C62] FROM [dbo].[Tickets] AS [Extent1] LEFT OUTER JOIN [dbo].[AccountTransactionDocuments] AS [Extent2] ON [Extent1].[TransactionDocument_Id] = [Extent2].[Id] LEFT OUTER JOIN (SELECT [Extent3].[Id] AS [Id1], [Extent3].[TicketId] AS [TicketId], [Extent3].[WarehouseId] AS [WarehouseId], [Extent3].[DepartmentId] AS [DepartmentId], [Extent3].[TerminalId] AS [TerminalId], [Extent3].[MenuItemId] AS [MenuItemId], [Extent3].[MenuItemName] AS [MenuItemName], [Extent3].[PortionName] AS [PortionName], [Extent3].[Price] AS [Price], [Extent3].[Quantity] AS [Quantity], [Extent3].[PortionCount] AS [PortionCount], [Extent3].[Locked] AS [Locked], [Extent3].[CalculatePrice] AS [CalculatePrice], [Extent3].[DecreaseInventory] AS [DecreaseInventory], [Extent3].[IncreaseInventory] AS [IncreaseInventory], [Extent3].[OrderNumber] AS [OrderNumber], [Extent3].[CreatingUserName] AS [CreatingUserName], [Extent3].[CreatedDateTime] AS [CreatedDateTime], [Extent3].[LastUpdateDateTime] AS [LastUpdateDateTime], [Extent3].[AccountTransactionTypeId] AS [AccountTransactionTypeId], [Extent3].[ProductTimerValueId] AS [ProductTimerValueId], [Extent3].[GroupTagName] AS [GroupTagName], [Extent3].[GroupTagFormat] AS [GroupTagFormat], [Extent3].[Separator] AS [Separator], [Extent3].[PriceTag] AS [PriceTag], [Extent3].[Tag] AS [Tag], [Extent3].[DisablePortionSelection] AS [DisablePortionSelection], [Extent3].[OrderUid] AS [OrderUid], [Extent3].[Taxes] AS [Taxes], [Extent3].[OrderTags] AS [OrderTags], [Extent3].[OrderStates] AS [OrderStates], [Extent4].[Id] AS [Id2], [Extent4].[ProductTimerId] AS [ProductTimerId], [Extent4].[PriceType] AS [PriceType], [Extent4].[PriceDuration] AS [PriceDuration], [Extent4].[MinTime] AS [MinTime], [Extent4].[TimeRounding] AS [TimeRounding], [Extent4].[Start] AS [Start], [Extent4].[End] AS [End] FROM [dbo].[Orders] AS [Extent3] LEFT OUTER JOIN [dbo].[ProductTimerValues] AS [Extent4] ON [Extent3].[ProductTimerValueId] = [Extent4].[Id] ) AS [Join2] ON [Extent1].[Id] = [Join2].[TicketId] WHERE ([Extent1].[Date] >= @p__linq__0) AND ([Extent1].[Date] < @p__linq__1) UNION ALL SELECT 2 AS [C1], [Extent5].[Id] AS [Id], [Extent5].[Id] AS [Id1], [Extent5].[LastUpdateTime] AS [LastUpdateTime], [Extent5].[TicketVersion] AS [TicketVersion], [Extent5].[TicketUid] AS [TicketUid], [Extent5].[TicketNumber] AS [TicketNumber], [Extent5].[Date] AS [Date], [Extent5].[LastOrderDate] AS [LastOrderDate], [Extent5].[LastPaymentDate] AS [LastPaymentDate], [Extent5].[PreOrder] AS [PreOrder], [Extent5].[IsClosed] AS [IsClosed], [Extent5].[IsLocked] AS [IsLocked], [Extent5].[RemainingAmount] AS [RemainingAmount], [Extent5].[TotalAmount] AS [TotalAmount], [Extent5].[DepartmentId] AS [DepartmentId], [Extent5].[TerminalId] AS [TerminalId], [Extent5].[TicketTypeId] AS [TicketTypeId], [Extent5].[Note] AS [Note], [Extent5].[LastModifiedUserName] AS [LastModifiedUserName], [Extent5].[TicketTags] AS [TicketTags], [Extent5].[TicketStates] AS [TicketStates], [Extent5].[TicketLogs] AS [TicketLogs], [Extent5].[LineSeparators] AS [LineSeparators], [Extent5].[ExchangeRate] AS [ExchangeRate], [Extent5].[TaxIncluded] AS [TaxIncluded], [Extent5].[Name] AS [Name], [Extent5].[Id] AS [Id2], [Extent6].[Id] AS [Id3], [Extent6].[Date] AS [Date1], [Extent6].[DocumentTypeId] AS [DocumentTypeId], [Extent6].[Name] AS [Name1], CAST(NULL AS int) AS [C2], CAST(NULL AS int) AS [C3], CAST(NULL AS int) AS [C4], CAST(NULL AS int) AS [C5], CAST(NULL AS int) AS [C6], CAST(NULL AS int) AS [C7], CAST(NULL AS int) AS [C8], CAST(NULL AS varchar(1)) AS [C9], CAST(NULL AS varchar(1)) AS [C10], CAST(NULL AS decimal(16,2)) AS [C11], CAST(NULL AS decimal(16,3)) AS [C12], CAST(NULL AS int) AS [C13], CAST(NULL AS bit) AS [C14], CAST(NULL AS bit) AS [C15], CAST(NULL AS bit) AS [C16], CAST(NULL AS bit) AS [C17], CAST(NULL AS int) AS [C18], CAST(NULL AS varchar(1)) AS [C19], CAST(NULL AS datetime2) AS [C20], CAST(NULL AS datetime2) AS [C21], CAST(NULL AS int) AS [C22], CAST(NULL AS int) AS [C23], CAST(NULL AS varchar(1)) AS [C24], CAST(NULL AS varchar(1)) AS [C25], CAST(NULL AS varchar(1)) AS [C26], CAST(NULL AS varchar(1)) AS [C27], CAST(NULL AS varchar(1)) AS [C28], CAST(NULL AS bit) AS [C29], CAST(NULL AS varchar(1)) AS [C30], CAST(NULL AS varchar(1)) AS [C31], CAST(NULL AS varchar(1)) AS [C32], CAST(NULL AS varchar(1)) AS [C33], CAST(NULL AS int) AS [C34], CAST(NULL AS int) AS [C35], CAST(NULL AS int) AS [C36], CAST(NULL AS int) AS [C37], CAST(NULL AS decimal(16,2)) AS [C38], CAST(NULL AS decimal(16,2)) AS [C39], CAST(NULL AS decimal(16,2)) AS [C40], CAST(NULL AS datetime2) AS [C41], CAST(NULL AS datetime2) AS [C42], [Extent7].[Id] AS [Id4], [Extent7].[EntityTypeId] AS [EntityTypeId], [Extent7].[EntityId] AS [EntityId], [Extent7].[AccountId] AS [AccountId], [Extent7].[AccountTypeId] AS [AccountTypeId], [Extent7].[EntityName] AS [EntityName], [Extent7].[EntityCustomData] AS [EntityCustomData], [Extent7].[Notes] AS [Notes], CAST(NULL AS int) AS [C43], CAST(NULL AS int) AS [C44], CAST(NULL AS varchar(1)) AS [C45], CAST(NULL AS int) AS [C46], CAST(NULL AS int) AS [C47], CAST(NULL AS int) AS [C48], CAST(NULL AS int) AS [C49], CAST(NULL AS bit) AS [C50], CAST(NULL AS bit) AS [C51], CAST(NULL AS bit) AS [C52], CAST(NULL AS decimal(16,2)) AS [C53], CAST(NULL AS decimal(16,2)) AS [C54], CAST(NULL AS decimal(16,2)) AS [C55], CAST(NULL AS decimal(16,10)) AS [C56], CAST(NULL AS datetime2) AS [C57], CAST(NULL AS varchar(1)) AS [C58], CAST(NULL AS int) AS [C59], CAST(NULL AS int) AS [C60], CAST(NULL AS int) AS [C61], CAST(NULL AS int) AS [C62], CAST(NULL AS int) AS [C63], CAST(NULL AS varchar(1)) AS [C64], CAST(NULL AS varchar(1)) AS [C65], CAST(NULL AS datetime2) AS [C66], CAST(NULL AS int) AS [C67], CAST(NULL AS decimal(16,2)) AS [C68], CAST(NULL AS decimal(16,2)) AS [C69], CAST(NULL AS int) AS [C70], CAST(NULL AS int) AS [C71], CAST(NULL AS decimal(16,10)) AS [C72], CAST(NULL AS varchar(1)) AS [C73], CAST(NULL AS bit) AS [C74], CAST(NULL AS int) AS [C75], CAST(NULL AS int) AS [C76], CAST(NULL AS int) AS [C77], CAST(NULL AS int) AS [C78], CAST(NULL AS varchar(1)) AS [C79], CAST(NULL AS datetime2) AS [C80], CAST(NULL AS int) AS [C81], CAST(NULL AS decimal(16,2)) AS [C82], CAST(NULL AS int) AS [C83], CAST(NULL AS decimal(16,10)) AS [C84], CAST(NULL AS int) AS [C85], CAST(NULL AS int) AS [C86], CAST(NULL AS int) AS [C87], CAST(NULL AS decimal(16,2)) AS [C88], CAST(NULL AS decimal(16,10)) AS [C89], CAST(NULL AS int) AS [C90], CAST(NULL AS int) AS [C91], CAST(NULL AS int) AS [C92], CAST(NULL AS bit) AS [C93], CAST(NULL AS bit) AS [C94], CAST(NULL AS varchar(1)) AS [C95] FROM [dbo].[Tickets] AS [Extent5] LEFT OUTER JOIN [dbo].[AccountTransactionDocuments] AS [Extent6] ON [Extent5].[TransactionDocument_Id] = [Extent6].[Id] INNER JOIN [dbo].[TicketEntities] AS [Extent7] ON [Extent5].[Id] = [Extent7].[Ticket_Id] WHERE ([Extent5].[Date] >= @p__linq__0) AND ([Extent5].[Date] < @p__linq__1) UNION ALL SELECT 3 AS [C1], [Extent8].[Id] AS [Id], [Extent8].[Id] AS [Id1], [Extent8].[LastUpdateTime] AS [LastUpdateTime], [Extent8].[TicketVersion] AS [TicketVersion], [Extent8].[TicketUid] AS [TicketUid], [Extent8].[TicketNumber] AS [TicketNumber], [Extent8].[Date] AS [Date], [Extent8].[LastOrderDate] AS [LastOrderDate], [Extent8].[LastPaymentDate] AS [LastPaymentDate], [Extent8].[PreOrder] AS [PreOrder], [Extent8].[IsClosed] AS [IsClosed], [Extent8].[IsLocked] AS [IsLocked], [Extent8].[RemainingAmount] AS [RemainingAmount], [Extent8].[TotalAmount] AS [TotalAmount], [Extent8].[DepartmentId] AS [DepartmentId], [Extent8].[TerminalId] AS [TerminalId], [Extent8].[TicketTypeId] AS [TicketTypeId], [Extent8].[Note] AS [Note], [Extent8].[LastModifiedUserName] AS [LastModifiedUserName], [Extent8].[TicketTags] AS [TicketTags], [Extent8].[TicketStates] AS [TicketStates], [Extent8].[TicketLogs] AS [TicketLogs], [Extent8].[LineSeparators] AS [LineSeparators], [Extent8].[ExchangeRate] AS [ExchangeRate], [Extent8].[TaxIncluded] AS [TaxIncluded], [Extent8].[Name] AS [Name], [Extent8].[Id] AS [Id2], [Extent9].[Id] AS [Id3], [Extent9].[Date] AS [Date1], [Extent9].[DocumentTypeId] AS [DocumentTypeId], [Extent9].[Name] AS [Name1],