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.
我有一个表“订单”,其中有一列“订单号”。如何选择 OrderNumber 的前四个字符等于某个字符序列的行数?
如何选择行数
使用Enumerable.Count 方法
OrderNumber 的前四个字符在哪里等于某个字符序列?
使用String.StartsWith 方法(字符串)
var resultCount = yourContext.Orders.Count(r=> r.OrderNumber.StartsWith("ABCD"));