Not your computer? Use a private browsing window to sign in. Learn more about using Guest mode
Not your computer? Use a private browsing window to sign in. Learn more about using Guest mode
YACQ - Yet Another Compilable Query Language for .NET YACQ ããã¸ã§ã¯ãã® Web ãµã¤ãã¸ãããããYACQ (yacc ã¨åãããã«çºé³ãã¾ã) 㯠.NET ä¸ã§åä½ããã½ããã¦ã§ã¢çµè¾¼å¯è½ãªã¯ã¨ãª / ã¹ã¯ãªããè¨èªã§ãã æ¦è¦ YACQ ã¯ã.NET Framework 4ãSilverlight 4ãã¾ã㯠Mono 2.10 ã§åä½ãããå®å ¨ã« C# ã®ã¿ã«ãã£ã¦æ¸ãããã½ããã¦ã§ã¢çµè¾¼å¯è½ãªã¯ã¨ãªè¨èªå¦çç³»ã§ãã YACQ ã¯æååã®å ¥åããã¨ã«ã.NET Framework ã«æ¨æºã§ç¨æããã¦ããå®è¡ã³ã¼ãã¸ã³ã³ãã¤ã«å¯è½ãªÂ å¼æ¨ (Expression Trees) ãçæããå¦çç³»ã§ãã YACQ 㯠CodeDOM ã®ãããªå¤é¨ã³ã³ãã¤ã©ã®å¼ã³åºããã¾ã㯠 DLR (Dynamic Language Run
æ´æ° : 2007 å¹´ 11 æ ãã¼ã«ã« ãã©ã¤ãã® <drive>:\Program Files\Microsoft Visual Studio 9.0\Sample ãã©ã«ãããã³ãªã³ã©ã¤ã³ä¸ã®ä»¥ä¸ã®å ´æã«ã¯ãLINQ ãã¯ããã¸ãç´¹ä»ãã C# ã®ãµã³ãã«ãç¨æããã¦ãã¾ãã Visual Studio Visual C# ãã£ããããã¼ ã»ã³ã¿ã¼ ãµã³ãã«ãéãã¦å®è¡ããæé ãããªã³ã©ã¤ã³ã§ç¨æããã¦ãã¾ãã ãã®ã»ã¯ã·ã§ã³ã®å 容 ãµã³ãã« ã¯ã¨ãª LINQ to ObjectsãLINQ to SQLãLINQ to XMLãããã³ LINQ to DataSet ã®ã¯ã¨ãªæä½ã®ä¾ã示ãã¾ãã Data ãµã³ãã« ãã¾ãã¾ãª LINQ ãµã³ãã«ã§ä½¿ç¨ãããå¤ãã®ã·ããªãªããµãã¼ãããããã«è¨è¨ããã¦ãã¾ãã NorthwindMapping ã®ãµã³ãã« ä»ã®ãµã³ãã«ã§ä½¿ç¨ããã
A way to use LINQ to Objects in C# 2.0 with .NET Framework 2.0 Download source code - 19.08 KB Introduction Language INtegrated Query in C# 3.0 is pure joy to use. Once you try it, you don't want to stop. But a few of us, for whatever reason, are still using Visual Studio 2005. In my case, I didn't want to pay $550 for the upgrade to VS2008 Pro, but I didn't want to lose features like Macros and C
æè¿ã®ä»äºã§åºå®ã®æ¤ç´¢æ¡ä»¶ã§ã¯ãªãåçã«æ¤ç´¢æ¡ä»¶ãä½ãããã¨ããä»æ§ããããããããã£ã¦Expressionå¨ããããããã¾ããã¦ãã¦æ¥½ããã£ãã®ã§è§£èª¬ããã ä»åã®ãµã³ãã«ã³ã¼ãã¯ãã¡ããããã¦ã³ãã¼ãã§ããã Linqã使ç¨ããå ´åã«åçã«æ¤ç´¢æ¡ä»¶ãä½ãããã«ã¯Expression Treeã¨æ¯ããå¿ è¦ããããLinq To Sqlã§ããã°Dynamic Linqã¨ããæååã解æãã¦Expression Treeã«å¤æãã¦ãããæ¡å¼µé¢æ°ç¾¤ãå ¬éããã¦ããã®ã§ãæååãããããã®ãè¦ã«ããªããã°ããªãç°¡åã«åçãªæ¤ç´¢æ¡ä»¶ãä½æãããã¨ãå¯è½ã ãããããLinq To Entityã ã¨ããã¯ãããªãã®ã§ã¡ãã£ã¨è¾¼ã¿å ¥ã£ããã¨ãããªãã¦ã¯ãªããªãã åçæ¤ç´¢æ¡ä»¶ã¨è¨ã£ã¦ãããã¹ã¦ã®æ¤ç´¢æ¡ä»¶ãAndæ¡ä»¶ã§ãããªãã°ãåç´ã«Whereã¡ã½ãããä¸è¨ã®ããã«é ã ã«å¼ã³åºãã¦ããã°ããã ããã i
åå (id:NyaRuRu:20070623:p1) ã®ç¶ããã¡ãã£ã¨ã ãï¼ ãã©ãã¼ã¢ãã ç¶ãã«ããåã«ãã©ãã¼ã¢ããï¼ id:siokoshou ããã® ã³ã¡ã³ã ã«ããããã«ï¼ååã®ã³ã¼ããµã³ãã«ã¯ï¼ä¸çªæåã®ã³ã¼ãããã¼ã¿ 2 以éã§ã¨ã©ã¼ã¨ãªãããã§ãï¼ ç´¹ä»ãã¦ããã ãã以ä¸ã®è¨äºã«ããããã«ï¼å¿ååã®åå¤æ§ã¨ hashcode ã«é¢ããã»ãã³ãã£ã¯ã¹ã使ããããããç®çã§ï¼å¿ååã¤ã³ã¹ã¿ã³ã¹ã®ããããã£ãã public setter ãã®ããã¦ãã¾ããã¨ã決ã¾ã£ãã¨ã®ãã¨ã§ããï¼ Sree's ventures in code space æ°ãã NewExpression ã®èª¬æãèªãã§ãã¦ï¼ã¡ãã£ã¨ãããããè¨æ³ãæãã¤ããã®ã§ããï¼beta 2 ããªãªã¼ã¹ãããã試ãã¦ã¿ã¾ãããï¼ ã¾ãååè¿°ã¹ãï¼å¿ååãå«ã Generic Type ãä½ã hack ã§ããï¼
å¿åå C# 3.0 ã§å°å ¥ãããå¿åå (AnonymousType)*1 ã¯ï¼Tuple ã®è¦ç´ ã«ã¿ã° (èå¥å) ã®ä»ãããã® (ããããã¬ã³ã¼ã) ã¨ã¿ããã¨ãã§ãã¾ãï¼ var person = new {ID=1, Name="Alice"}; person = new {ID=2, Name="Bob"}; å¿ååã¯ã³ã³ãã¤ã©ã«ãã£ã¦ã³ã³ãã¤ã«æã«çæãããå é¨åã§ããï¼åä¸ã®è¦ç´ ãåãé åºã§ä¸¦ã¹ãå¿ååã¯ï¼åãããã°ã©ã *2 ã®ä¸ã§åãåã«ãªããã¨ãä¿è¨¼ããã¦ãã¾ãï¼ å¿ååã§æ å ±ãè¿ã ãã¦ï¼å¿ååã¯ï¼æåéããã®çã®ååãé ããã¦ãã¦ï¼ãã£ã¼ã«ããã¡ã½ããã·ã°ããã£ã«ä½¿ãããã¦ããã®ååãæ¸ããã¨ãã§ãã¾ããï¼å¿ååã§æ å ±ãè¿ãããå ´åã¯ã©ãããã°ããã®ã§ããããï¼ C# 2.0/C# 3.0 ã§å°å ¥ãããåæ¨è«ãç¨ããã¨ï¼ããã¤ãã®å ´é¢ã§ååããããã«æ¸ãå¿ è¦ããªã
ä»äºã§LINQ to SQLã使ã£ã¦DBãããã¼ã¿ãæ¤ç´¢ãã¦ããã¢ããªãéçºãã¦ãã¦ãæ¤ç´¢ããå¤ãã¹ãã¼ã¹ã§åºåã£ãå ´åã¯ORæ¤ç´¢ããã¨ããä»æ§ãå®è£ ããå¿ è¦ããã£ãã ORæ¤ç´¢èªä½ã¯ä»¥ä¸ã®ããã«è«çæ¼ç®åã§æ¡ä»¶ãã¤ãªãã§ããã ãã var result = from d in db.Document where d.FileName.Contains("å¤ï¼") || d.FileName.Contains("å¤ï¼") select d; ããæ¸ããã®ã¯æ¡ä»¶ã®æ°ãããã£ã¦ããããã§ãä»åã®å ´åã¯åçã«æ¡ä»¶ãå¤ãããããã®æ¸ãæ¹ã¯ã§ããªããSQLã§ããã°åã«æååãé£çµãã¦ããã°ããã ãã ãã©ãLINQã®å ´åã¯ããã¯ãããªãã ãªã®ã§ãããããæã¯Expressionã使ããã¨ã«ãªãï¼é¢åããããããã¾ããããããªãã£ããã©ï¼ãã¡ãªã¿ã«ãANDæ¡ä»¶ã®å ´åã¯Whereã¡ã½ããã§é£çµããã°ãã
次ä¸ä»£ãã¼ã¿ã¢ã¯ã»ã¹ãã¯ããã¸ã¼ 第1åï¼LINQã¨ADO.NET Entity Framework èè ï¼ãã¤ã¯ãã½ãã  å°é« 太é å ¬éæ¥ï¼2008/1/8ï¼ç«ï¼ LINQã¨ADO.NET Entity Framework ãã¤ã¯ãã½ããã¯Visual Studioã®æ¬¡æã¡ã¸ã£ã¼ãªãªã¼ã¹Visual Studio 2008ããªãªã¼ã¹ãããVisual Studio 2008ãç»å ´ãããã¨ã§ããããããNET Framework 3.0ã«å®å ¨ã«å¯¾å¿ããéçºãã¼ã«ãå ¥æã§ããããã«ãªãã Visual Studio 2008ã§ã追å ãããæ©è½ã®ä¸ã§æ³¨ç®åº¦ã大ããã®ãLINQã§ãããLINQã¨ã¯ã.NET Frameworkã§ä½¿ç¨ããè¨èªãæ¡å¼µããå½¢ã§å®è£ ããããè¨èªåãè¾¼ã¿ã¯ã¨ãªã¼æè¡ã§ãããLINQã使ç¨ããã¨ãã®ããã«ããã°ã©ã è¨èªã¨ãã¦ãSQLã©ã¤ã¯ã«ã³ã¼ãã£ã³ã°ã§ããã¨ããç¹å¾´ã
åæ¸ç±ã¯ããã¨ãã¨æ¬ãã©ã¼ã©ã ã«ã¦é£è¼ãã¦ãããC# 2.0å ¥éãããC# 3.0å ¥éãã®è¨äºãæ´ççµ±åããå çãä¿®æ£ããããã®ã§ãã æå ã§ã¾ã¨ãã¦èªã¿ããæ¹ã¯ããã²æ¸åºãªã©ã«ã¦ãè²·ãæ±ããã ããã ã注æãæ¬è¨äºã¯ãæ¸ç±ã®å 容ãæ¹å¤ãããã¨ãªãããã®ã¾ã¾è»¢è¼ãããã®ã§ãããã®ããç¨åç¨èªã®çµ±ä¸ã«ã¼ã«ãªã©ã¯ï¼ ITã®ããã¨ã¯ä¸è´ãã¾ãããããããããäºæ¿ãã ããã 15.1 LINQã®é¢ç½ã LINQï¼ãªã³ã¯ï¼ã®è©±ãå§ããåã«ãã¾ãã³ã¼ãä¾ã1ã¤ç´¹ä»ããããçè ãLINQã«ã¤ãã¦èª¿ã¹ã¦ããã¨ãã«ãç¹ã«é¢ç½ãã¨æã£ãMSDNã®ãµã³ãã«ã ã æ¹æ³:ãã£ã¬ã¯ããªããªã¼ã§éè¤ãããã¡ã¤ã«ãåãåãããï¼LINQï¼ http://msdn.microsoft.com/ja-jp/library/bb546133.aspx ãã£ã¬ã¯ããªã®ããªã¼ã®ä¸ã§ã¯ãç°ãªããã£ã¬ã¯ããªã«åããã¡ã¤ã«åãæã¤ãã¡ã¤ã«
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}