Razorページ+DBアクセス 練習問題 プロジェクト名:db_ex1 Employeeクラス db_ex0と同じ。 EmployeeDAOクラス Index.cshtml.cs Index.cshtml プロジェクト名:db_ex2 Employeeクラス db_ex0と同じ。 EmployeeDAOクラス Index.cshtml.cs Index.cshtml プロジェクト名:db_ex3 Employeeクラス db_ex0と同じ。 EmployeeDAOクラス Index.cshtml.cs Index.cshtml プロジェクト名:db_ex4 Summaryクラス EmployeeDAOクラス Index.cshtml.cs Index.cshtml プロジェクト名:db_ex5 Summaryクラス db_ex4と同じ。 EmployeeDAOクラス Index.cshtml.cs Index.cshtml プロジェクト名:db_ex6 Employeeクラス db_ex0と同じ。 EmployeeDAOクラス Index.cshtml.cs Index.cshtml 以上、解答例でした。 今日のホワイトボード 練習問題のヒントを少し。 Listからforeachに要素を順にとりだす 〇キーワードvar 変数itemにはList<Item>型のlistの要素を1つずつ順に代入される。 listの要素はItemクラス型なので、変数itemに代入される値もItemクラス型。 宣言のさい、代入値から明らかに型が決まる場合、型を指定せずvarで宣言可能。 図 foreachで要素を順にとりだす SQLのあいまい検索 ワイルドカードを忘れていると思い、おさらい。 図 SQLのあいまい検索 予告 次回あたりから確認実技テストをやります。