我需要将查询从 sql 转换为 linq 创建表历史
CREATE TABLE [dbo].[History](
[HistoryID] [int] IDENTITY(1,1) NOT NULL,
[AuctionID] [int] NOT NULL,
[UserName] [nvarchar](128) NULL,
[Time] [datetime] NOT NULL,
[Price] [decimal](18, 2) NOT NULL,
)
询问
select [UserName],[Price] from [History]
where [Price] in
(SELECT [Price] FROM [History]
where ID=28 GROUP BY [Price]
HAVING COUNT(*)=1)
Order by [Price]