Sqlserver のビューを使用する代わりに、Linq クエリを使用します。メソッドに入れたいのですが、私の出力タイプは何ですか? 助けてくれてありがとう
public ???? InsuranceWorkerView()
{
var InsuranceWorkers =(from ins_insuranceworkers in db.INS_InsuranceWorkers
join dv in db.DivisionCountry on new { InsWorkerCityID = ins_insuranceworkers.InsWorkerCityID } equals new { InsWorkerCityID = dv.DivisionID } into divisioncountry_1_join
from dv in divisioncountry_1_join.DefaultIfEmpty()
join divisioncountry in db.DivisionCountry on new { InsWorkerStateID = ins_insuranceworkers.InsWorkerStateID } equals new { InsWorkerStateID = divisioncountry.DivisionID } into divisioncountry_join
from divisioncountry in divisioncountry_join.DefaultIfEmpty()
select new
{
ins_insuranceworkers.InsWorkerID,
ins_insuranceworkers.InsWorkerCreateUserID,
ins_insuranceworkers.InsWorkerTypeID,
ins_insuranceworkers.InsWorkerFirstName,
ins_insuranceworkers.InsWorkerLastName,
ins_insuranceworkers.InsWorkerNationalCode,
ins_insuranceworkers.InsWorkerMobileNum,
ins_insuranceworkers.InsWorkerAddress,
ins_insuranceworkers.InsWorkerEmail,
City = dv.DivisionName,
State = divisioncountry.DivisionName,
InsWorkerStateID =(Int32?)ins_insuranceworkers.InsWorkerStateID,
InsWorkerCityID = (Int32?)ins_insuranceworkers.InsWorkerCityID
}).ToList();
return InsuranceWorkers;
}