SQL 和LINQ 左連線 , 右連線, 內連線 語法對照
LINQ 語法 |
TSQL |
左聯接 var equipmentType = from a in ctx.TB_EquipmentType |
左聯接 SELECT a.Id |
內聯接 var equipmentType = from a in ctx.TB_EquipmentType |
SELECT a.Id ,a.Code ,a.Name ,a.Remark ,a.CreatedTime ,b.Name ,a.LastModifiedTime ,c.Name FROM TB_EquipmentType as a join TB_User as b on a.CreatedBy = b.Id join TB_User as c on a.LastModifiedBy = c.Id GO |