C#開發利器 Linq Pad 相關

來源:互聯網
上載者:User

標籤:pki   連結   efi   drive   context   pre   for   efault   download   

一,下載

Linq Pad 是平時在開發的過程中使用的利器,為什麼這樣說了。 你不用開啟VS, 直接敲代碼就行,F5運行即可以看到結果。 而且支援Linq, 是不錯的選擇。 

最近想開發一個日誌分析工具,簡單的日誌分析工具。 使用linq 讀取日誌只有,直接寫入到mysql 資料庫,然後查詢結果即可。這個項目我也是準備開源到GitHub

二,基礎配置

先來一張:

基礎的介面。 

 

三,資料庫配置

 

 如果需要連結mysql和其他資料庫,需要手動下載驅動。 或者直接從網站下載驅動。http://www.linqpad.net/RichClient/DataContextDrivers.aspx

匯入驅動 :

四,執行SQL 查詢或者 linq 查詢。

 1 void Main() 2 { 3  4  5 /*  6   SELECT csdp.* from csdevdpoint csdp 7 INNER JOIN cscloudsdevice csd  on csdp.CloudSDevice_PkId = csd.PkId 8 INNER JOIN cscloudsdgroupvalue csgv  on csgv.CloudSDevice_PkId = csd.PkId 9 INNER JOIN cscloudsdgroup csg on csgv.CloudSDGroup_PkId = csg.PkId and csg.Flag = 010 where csg.CloudTreeKey = ?  and csd.Flag = 0 and csdp.Flag = 0 */11     //查詢12     var all19 = (from csdp in Csdevdpoints 13                 join csd in Cscloudsdevices 14                 on  csdp.CloudSDevice_PkId equals csd.PkId  15                 join csgv in Cscloudsdgroupvalues 16                 on csd.PkId equals csgv.CloudSDevice_PkId  17                 join csg in Cscloudsdgroups 18                 on csgv.CloudSDGroup_PkId equals csg.PkId  19                 where 20                 csdp.Flag == 021                  &&22                  csd.Flag == 023                  &&24                  csg.Flag == 025                  &&26                  csg.CloudTreeKey == "19:"27                  &&28                  csdp.PointType == 12329                  select csdp );30                 31                 32     //all19.Dump();33     try {34     foreach(var item in all19 ) {35         var point = this.Pointinfos.FirstOrDefault( t => t.Pkid == item.PointId);36         if(point != null) {37             //point.Dump();38             if(! (point.EndpointType_ID == 123)) {39                 point.EndpointType_ID = 123;40                 this.SubmitChanges();41             }else {42              point.Dump();43             }44         }45     }46     }catch(Exception exp ) {47     exp.Dump();48     }49 }50 51 // Define other methods and classes here

 

怎麼樣,是不是很好用。

 附: 

 

http://download.csdn.net/detail/yijianxiangde100/9661224

 

C#開發利器 Linq Pad 相關

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.