TableTypeで条件を適用したいと思います。Linqユースケース
If t.TableName='limit' then TabeType should be A_TypeTable
If t.TableName='health' then TabeType should be B_TypePolicy
If t.TableName='waiting' then TabeType should be C_TypeTable
以下はクエリです。私は、ケースステートメントをどこに割り当てるかはわかりません。
var query = from a in tableA
join b in tableB on a.Hid equals b.Hid into ab
select new
{
TableType= ab.Select(t=>t.TableName).FirstOrDefault(),
UserName = a.UserName,
Description = a.Description,
ImportedDate = a.ImportedDate
};
いずれかの提案があります。これは、回避策かもしれないが、あなたは文字列としてテーブル名を受け入れて、文字列としてテーブル型を返すするメソッドを作成し、試して作ることができる