nullの条件分岐とキャスト。
成果物
情報源
コード
null除外
from c in categories where c != null join p in products on c.ID equals p?.CategoryID select new { Category = c.Name, Name = p.Name };
null許容型へキャスト
from c in categories join p in products on c.ID equals (int?)p.CategoryID select new { Category = c.Name, Name = p.Name };
対象環境
- Raspbierry pi 3 Model B+
- Raspbian stretch 9.0 2018-11-13
- bash 5.0.3(1)-release
$ uname -a Linux raspberrypi 4.19.75-v7l+ #1270 SMP Tue Sep 24 18:51:41 BST 2019 armv7l GNU/Linux