从MT_Vehicle中选择IsDeleted = 0且CreatedBy = 1
的计数(不同的LicencePlate)答案 0 :(得分:0)
您可以这样写:
var count = db.MT_Vehicle
.Where( v => v.IsDeleted == 0 && v.CreatedBy == 1 )
.Select(v => v.LicencePlate)
.Distinct()
.Count();
答案 1 :(得分:0)
var count = MT_Vehicle.Where(x => x.IsDeleted==0 && x.CreatedBy == 1)
.Select(x => x.LicencePlate)
.Distinct()
.Count();