• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Query类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Query的典型用法代码示例。如果您正苦于以下问题:C# Query类的具体用法?C# Query怎么用?C# Query使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Query类属于命名空间,在下文中一共展示了Query类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: FetchAll

 public ErrorLogCollection FetchAll()
 {
     ErrorLogCollection coll = new ErrorLogCollection();
     Query qry = new Query(ErrorLog.Schema);
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
开发者ID:khaha2210,项目名称:radio,代码行数:7,代码来源:ErrorLogController.cs


示例2: FetchAll

 public StudyHistoryCollection FetchAll()
 {
     var coll = new StudyHistoryCollection();
     var qry = new Query(StudyHistory.Schema);
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
开发者ID:khaha2210,项目名称:radio,代码行数:7,代码来源:StudyHistoryController.cs


示例3: FetchAll

 public DisposeTableCollection FetchAll()
 {
     DisposeTableCollection coll = new DisposeTableCollection();
     Query qry = new Query(DisposeTable.Schema);
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
开发者ID:howgoo,项目名称:SubSonic-2.0,代码行数:7,代码来源:DisposeTableController.cs


示例4: FetchAll

 public QheDoituongThuocCollection FetchAll()
 {
     QheDoituongThuocCollection coll = new QheDoituongThuocCollection();
     Query qry = new Query(QheDoituongThuoc.Schema);
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
开发者ID:khaha2210,项目名称:VXIS,代码行数:7,代码来源:QheDoituongThuocController.cs


示例5: FetchAll

 public B3LookupContactIDCollection FetchAll()
 {
     B3LookupContactIDCollection coll = new B3LookupContactIDCollection();
     Query qry = new Query(B3LookupContactID.Schema);
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
开发者ID:Publiship,项目名称:WWI_CRM_folders,代码行数:7,代码来源:B3LookupContactIDController.cs


示例6: FetchAll

 public TDutruThuocCollection FetchAll()
 {
     TDutruThuocCollection coll = new TDutruThuocCollection();
     Query qry = new Query(TDutruThuoc.Schema);
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
开发者ID:khaha2210,项目名称:VXIS,代码行数:7,代码来源:TDutruThuocController.cs


示例7: FetchAll

 public AspnetPersonalizationAllUserCollection FetchAll()
 {
     AspnetPersonalizationAllUserCollection coll = new AspnetPersonalizationAllUserCollection();
     Query qry = new Query(AspnetPersonalizationAllUser.Schema);
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
开发者ID:unepwcmc,项目名称:sigtrade,代码行数:7,代码来源:AspnetPersonalizationAllUserController.cs


示例8: GetIdfWeightedTerms

 /// <summary> Extracts all terms texts of a given Query into an array of WeightedTerms
 /// 
 /// </summary>
 /// <param name="query">Query to extract term texts from</param>
 /// <param name="reader">used to compute IDF which can be used to a) score selected fragments better 
 /// b) use graded highlights eg chaning intensity of font color</param>
 /// <param name="fieldName">the field on which Inverse Document Frequency (IDF) calculations are based</param>
 /// <returns> an array of the terms used in a query, plus their weights.</returns>
 public static WeightedTerm[] GetIdfWeightedTerms(Query query, IndexReader reader, string fieldName)
 {
     WeightedTerm[] terms = GetTerms(query, false, fieldName);
     int totalNumDocs = reader.NumDocs();
     foreach (WeightedTerm t in terms)
     {
         try
         {
             int docFreq = reader.DocFreq(new Term(fieldName, t.Term));
             // docFreq counts deletes
             if (totalNumDocs < docFreq)
             {
                 docFreq = totalNumDocs;
             }
             //IDF algorithm taken from DefaultSimilarity class
             var idf = (float)(Math.Log((float)totalNumDocs / (double)(docFreq + 1)) + 1.0);
             t.Weight *= idf;
         }
         catch (IOException e)
         {
             //ignore
         }
     }
     return terms;
 }
开发者ID:Cefa68000,项目名称:lucenenet,代码行数:33,代码来源:QueryTermExtractor.cs


示例9: dispatcherTimer_Tick

        void dispatcherTimer_Tick(object sender, EventArgs e)
        {
            _infoWindow.IsOpen = false;

            QueryTask queryTask =
                new QueryTask("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/4");
            Query query = new Query()
            {
                Geometry = _tapPoint,
                OutSpatialReference = MyMap.SpatialReference
            };
            query.OutFields.Add("NAME");

            queryTask.ExecuteCompleted += (s, evt) =>
            {
                if (evt.FeatureSet.Features.Count > 0)
                {
                    _infoWindow.Anchor = _tapPoint;
                    (_infoWindow.Content as TextBlock).Text = evt.FeatureSet.Features[0].Attributes["NAME"] as string;
                    _infoWindow.IsOpen = true;
                }
            };
            queryTask.ExecuteAsync(query);
            _dispatcherTimer.Stop();
        }
开发者ID:Esri,项目名称:arcgis-samples-winphone,代码行数:25,代码来源:InfoWindowDynamic.xaml.cs


示例10: FetchAll

 public URLTagsExtCollection FetchAll()
 {
     URLTagsExtCollection coll = new URLTagsExtCollection();
     Query qry = new Query(URLTagsExt.Schema);
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
开发者ID:rafathan,项目名称:OriginalIntranet,代码行数:7,代码来源:URLTagsExtController.cs


示例11: FetchAll

 public DmucDiachinhCollection FetchAll()
 {
     DmucDiachinhCollection coll = new DmucDiachinhCollection();
     Query qry = new Query(DmucDiachinh.Schema);
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
开发者ID:khaha2210,项目名称:VXIS,代码行数:7,代码来源:DmucDiachinhController.cs


示例12: FetchAll

 public KcbDangkySokhamCollection FetchAll()
 {
     KcbDangkySokhamCollection coll = new KcbDangkySokhamCollection();
     Query qry = new Query(KcbDangkySokham.Schema);
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
开发者ID:vmshis2020,项目名称:VMSHISServer,代码行数:7,代码来源:KcbDangkySokhamController.cs


示例13: MultiValueAttribute

		public void MultiValueAttribute() {
			Services subject = new Services(Meta, DataConnector);
			Query queryStories = new Query(Oid.FromToken("Story:1063", Meta));
			IAttributeDefinition ownersDef = Meta.GetAttributeDefinition("Story.Owners");
			queryStories.Selection.Add(ownersDef);
			QueryResult resultStories = subject.Retrieve(queryStories);

			Asset story = resultStories.Assets[0];
			Oid oldMember = Oid.FromToken("Member:1001", Meta);
			Oid newMember = Oid.FromToken("Member:20", Meta);
			IEnumerator owners = story.GetAttribute(ownersDef).Values.GetEnumerator();
			Assert.IsTrue(owners.MoveNext());
			Assert.AreEqual(oldMember, owners.Current);
			Assert.IsFalse(owners.MoveNext());

			story.AddAttributeValue(ownersDef, newMember);
			owners = story.GetAttribute(ownersDef).Values.GetEnumerator();
			Assert.IsTrue(owners.MoveNext());
			Assert.AreEqual(oldMember, owners.Current);
			Assert.IsTrue(owners.MoveNext());
			Assert.AreEqual(newMember, owners.Current);
			Assert.IsFalse(owners.MoveNext());

			story.RemoveAttributeValue(ownersDef, oldMember);
			owners = story.GetAttribute(ownersDef).Values.GetEnumerator();
			Assert.IsTrue(owners.MoveNext());
			Assert.AreEqual(newMember, owners.Current);
			Assert.IsFalse(owners.MoveNext());

			story.RemoveAttributeValue(ownersDef, newMember);
			owners = story.GetAttribute(ownersDef).Values.GetEnumerator();
			Assert.IsFalse(owners.MoveNext());
		}
开发者ID:RedwardsiPipeline,项目名称:VersionOne.SDK.NET.APIClient,代码行数:33,代码来源:MultiValueAttributeTester.cs


示例14: FetchAll

 public PGenuCollection FetchAll()
 {
     PGenuCollection coll = new PGenuCollection();
     Query qry = new Query(PGenu.Schema);
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
开发者ID:unepwcmc,项目名称:sigtrade,代码行数:7,代码来源:PGenuController.cs


示例15: FetchAll

 public Registration1Collection FetchAll()
 {
     Registration1Collection coll = new Registration1Collection();
     Query qry = new Query(Registration1.Schema);
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
开发者ID:Publiship,项目名称:WWI_CRM_folders,代码行数:7,代码来源:Registration1Controller.cs


示例16: FetchAll

 public SysResourceCollection FetchAll()
 {
     SysResourceCollection coll = new SysResourceCollection();
     Query qry = new Query(SysResource.Schema);
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
开发者ID:eleooo,项目名称:App,代码行数:7,代码来源:SysResourceController.cs


示例17: FetchAll

 public CustomizedProductDisplayTypeCollection FetchAll()
 {
     CustomizedProductDisplayTypeCollection coll = new CustomizedProductDisplayTypeCollection();
     Query qry = new Query(CustomizedProductDisplayType.Schema);
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
开发者ID:89sos98,项目名称:dashcommerce-3,代码行数:7,代码来源:CustomizedProductDisplayTypeController.cs


示例18: FetchAll

 public TPhieuCapphatChitietCollection FetchAll()
 {
     TPhieuCapphatChitietCollection coll = new TPhieuCapphatChitietCollection();
     Query qry = new Query(TPhieuCapphatChitiet.Schema);
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
开发者ID:khaha2210,项目名称:VXIS,代码行数:7,代码来源:TPhieuCapphatChitietController.cs


示例19: FetchAll

 public NoitruDmucGiuongbenhCollection FetchAll()
 {
     NoitruDmucGiuongbenhCollection coll = new NoitruDmucGiuongbenhCollection();
     Query qry = new Query(NoitruDmucGiuongbenh.Schema);
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
开发者ID:khaha2210,项目名称:VXIS,代码行数:7,代码来源:NoitruDmucGiuongbenhController.cs


示例20: FetchAll

 public FavLinkCollection FetchAll()
 {
     FavLinkCollection coll = new FavLinkCollection();
     Query qry = new Query(FavLink.Schema);
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
开发者ID:hieuuk,项目名称:pingpoong,代码行数:7,代码来源:FavLinkController.cs



注:本文中的Query类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# QueryBuilder类代码示例发布时间:2022-05-24
下一篇:
C# QueriableDummy类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap