在dbset对象上放置一个过滤器 [英] Put a filter on dbset object
本文介绍了在dbset对象上放置一个过滤器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨朋友我在模特之下传递给我的观点
Hi Friends I am passing below model to on of my view
view(db.ProductDetails.ToList())
但重点是我想在这个产品详细信息dbset上添加一个过滤器并找到所需的行数然后将其转换为列表
你可以帮我解决这个问题吗
but the point is i want put a filter on this productdetails dbset and find the required number of rows and then covert it a list
can u help me with this
推荐答案
你可以试试选择(Linq) [ ^ ]加上 Where where [ ^ ]和ToList ()
。
101 Linq样本(C#) [ ^ ]
You can try Select (Linq)[^] plus Where method[^] together withToList()
.
101 Linq Samples (C#)[^]
这篇关于在dbset对象上放置一个过滤器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文