
October 1, 2008 18:18 by
C#のささやかな(でもかっこいい)言語機能の1つが??です。"Null合体"演算子です。これにより、値がNullかどうかをチェック、また、もしそうであれば代替値を返すという、きれいで簡潔な方法が提供されます。
[More]
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5

August 27, 2008 15:14 by
やっと最近LINQに触り始めて、今一番楽しいところなんで、自分がやってみたことをまとめていきたいと思います。
まぁ、まだまだこんなことができるんだぁ、と文法を追っているレベルなんで、たいしたことは書けないですが。
[More]
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5

August 21, 2008 23:44 by
データを抽出する場合に、たとえばIDが1、3、4、8の人だけを抽出する、といった感じで値を複数特定し、そのデータだけを抽出したいという場合があります。SQL文でいうとINを利用したい場合、といったほうがわかりやすいかもしれません。
こういった場合に配列やListのContainsメソッドをwhereの条件として記述することができます。
[More]
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5

August 21, 2008 23:31 by
LINQ + VB.NETで実装した場合のWhere条件における「Is Nothing」vs 「= Nothing」の違いを 纏めました
[More]
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5

August 12, 2008 20:56 by
今まで LINQ to Object の基本くらいしか知らなかったので、今日は大収穫を得た。
一番の収穫はやはり LINQ to SQL。
つか、LINQ to SQL の場合、where 句のラムダ式が SQL の where 句に変換されるというのは、正直半信半疑だった。
[More]
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5

August 3, 2008 09:47 by
複数のデータを削除するには、対象となるデータを抽出し、その結果をRemoveAllメソッドに渡します。
たとえば以下のようなプログラムになります。
[More]
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5

August 1, 2008 19:50 by
LINQ to XMLということで、LINQはXML形式のデータを扱うこともできます。
たとえば次のようなプログラムで
[More]
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5

January 24, 2008 02:59 by
LINQ to SQL HOL VB.NET Code
[More]
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5

January 19, 2008 22:11 by
System.Data.SqlClient, System.Data.OdbcClient, System.Data.OleDbの各DbConnection実装におけるInfoMessage のばらばら具合は何とかならんもんなのでしょうかねぇ。
[More]
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5

January 16, 2008 04:47 by
1. LINQ to SQL クラスを追加し、テーブルを追加する。
2. 関連付けを行う。Participating Properties:Table_1.ID -> Table_3.ID
using System;
using System.Linq;
using System.Data.Linq;
using System.IO;
namespace ConsoleApplication5
{
class Program
{
&n...
[More]
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5

January 15, 2008 01:49 by
GridView のデータソースをLINQ to SQL でセットする
[More]
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5

October 17, 2007 03:32 by
以前紹介しているものもありますが、あらためてリンクを貼っておきます。
C# 3.0 の概要
LINQ: .NET 統合言語クエリ
.NET 標準クエリ演算子
LINQ to SQL: リレーショナル データのための .NET 統合言語クエリ
XML データ用の .NET 統合言語クエリ
日本語訳されているのはうれしいですね。
まずは一通り読んでおきましょう。
Currently rated 3.0 by 2 people
- Currently 3/5 Stars.
- 1
- 2
- 3
- 4
- 5

October 17, 2007 00:35 by
データベースにデータを追加してみます。
次のようなプログラムを記述します。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace LINQ5
{
class Program
{
static void Main(string[] args)
&...
[More]
Currently rated 4.0 by 1 people
- Currently 4/5 Stars.
- 1
- 2
- 3
- 4
- 5

October 16, 2007 22:35 by
using System;
using System.Linq;
namespace LINQ6
{
class Program
{
static void Main(string[] args)
{
 ...
[More]
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5

October 16, 2007 22:33 by
データを削除するには、該当するデータのインスタンスを特定する必要があります。そこで追加した1件のデータを特定するための方法を考えていたところ、プログラムの記述方法がいくつかあることに気づきました。
その試行錯誤の経過をまとめておこうと思います。
[More]
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5