Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
SQL 语句:
select 'iphone',count(*) from tablename where id=5
结果:
姓名号码 'iphone' 50
我应该如何使用 linq 来获得相同的结果(SQL 语句)?
提前致谢。
var Result = new { Name = "iPhone", Num = yourSequence.Count(x => x.Id == 5) };