「ORMがトラブル起こすから嫌い」なんじゃなくて、「ORMが起こすトラブルが解決できないから嫌い」ってのがほんとのところじゃない?だったら解決方法を知ればいいんじゃね?というお話。「N+1問題」もろくに知らずにORMを批判せんでほしい。Read less
あると便利ですよね、ということで書いてみた。 よくあるコーディングパターンには yield とか使ってないです。 こっちの方がよくありそうでしょ? Select 全ての要素に何らかの処理を行いたいときに使用します。 // よくあるコーディングパターンその1 // 全ての要素を2倍するメソッド public IEnumerable<int> DoubleAll(int[] target) { var result = new int[target.Length]; for (int i = 0; i < target.Length; i++) { result[i] = target[i] * 2; } return result; } // Selectで書き直し public IEnumerable<int> DoubleAll(IEnumerable<int> target) { re
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く