我正在将项目从VB.NET转换为C#.NET,但是某些地方的语法在VB中是正确的,但在C#中不起作用,并抛出一些错误。
response = (from setng in entities.Settings
join DF in entities.DownloadFileSortTables on setng.SystemSettID equals Convert.ToInt32(DF.FileId) into Dyne
from Fitem in Dyne.DefaultIfEmpty
where setng.SystemSettID = userSettingID
select new DynamicDownloadSortFileViewModel { Id = setng.SystemSettID, FileName = Fitem.FileName, FIleURL = Fitem.FIleURL,
PageName = Fitem.PageName, ListName = Fitem.ListName, ListId = Fitem.ListId }).FirstOrDefault();
Fitem
中Dyne.DefauldIfEmpty
之前的关键字“ from”在标题中引发错误。