在数据库中我想要获得价值确切的一些价值观如何做到这一点 [英] In Database I Want To Get The Value Exact Some Values How To Do That

查看:57
本文介绍了在数据库中我想要获得价值确切的一些价值观如何做到这一点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我所有的价值只有几个价值

如何使用除了这个在normall我使用



db.ConfigurationTables.ToList();



所以如何使用除

in Configuration Table have all values i wnat to get only few value
how to use except for this in normall i am using

db.ConfigurationTables.ToList();

so how to use except

推荐答案

使用linq查询语法您可以过滤配置结果。例如



By using linq query syntax you can filter your configuration results. for example

var results=db.ConfigurationTables.Where(//Your condition here).ToList();//return one or more than one result
 
var results=db.ConfigurationTables.FirstOrDefault(//Your condition here).ToList();//return  one result





还有很多其他的查询的扩展方法。有关Linq的更多信息请访问此链接 http://code.msdn.microsoft.com / 101-LINQ-Samples-3fb9811b [ ^ ]



希望这有帮助



there are lot of other extension methods for querying.For more about Linq go through this link http://code.msdn.microsoft.com/101-LINQ-Samples-3fb9811b[^]

Hope this helps


这篇关于在数据库中我想要获得价值确切的一些价值观如何做到这一点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆