orm 给字段起别名,使用alias函数

var session = LepulsDB.DBContext.ACC_ConfSeverity.Select(LepulsDB.ACC_ConfType,(t,f)=>t.Field(t.All,f.Name.Alias("TypeName")))
.Join(LepulsDB.ACC_ConfType,(t,f)=>t.Acc_ConfTypeID==f.ACC_ConfTypeID)
.SetSelectRange(search.PageSize, search.SkipCount)
.Where(m => m.IsDelete == false || m.IsDelete == null);

posted @ 2017-12-12 19:41  飞刀软件  阅读(747)  评论(0编辑  收藏  举报