エントリーの編集
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
introduction to asp dot net - ASP.NET勉強会
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
introduction to asp dot net - ASP.NET勉強会
// GET: Todoes/Details/5 public ActionResult Details(int? id) { if (id == null) { return new Http... // GET: Todoes/Details/5 public ActionResult Details(int? id) { if (id == null) { return new HttpStatusCodeResult(HttpStatusCode.BadRequest); } Todo todo = db.Todoes.Find(id); if (todo == null) { return HttpNotFound(); } return View(todo); } Detailsメソッドの定義です。 int? は int の Nullable型 です。 通常の int は null を設定できませんが、Nullable型は null が許容されます。 RouteConfig.cs の defaults の定義により、idは省略可能です。 id が省略された場合、Details

