From cc29c55ba5a4d5904c95a178e2a6066e3647b1f2 Mon Sep 17 00:00:00 2001 From: Tien Tran <20102315@student.hut.edu.vn> Date: Mon, 9 Oct 2017 16:42:28 +0700 Subject: [PATCH] add db context --- aspnetcore/mvc/razor-pages/index.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aspnetcore/mvc/razor-pages/index.md b/aspnetcore/mvc/razor-pages/index.md index 7e28a822e4..fb247b0bfd 100644 --- a/aspnetcore/mvc/razor-pages/index.md +++ b/aspnetcore/mvc/razor-pages/index.md @@ -103,6 +103,10 @@ The data model: [!code-cs[main](index/sample/RazorPagesContacts/Data/Customer.cs)] +The db context: + +[!code-cs[main](index/sample/RazorPagesContacts/Data/AppDbContext.cs)] + The *Pages/Create.cshtml* view file: [!code-cshtml[main](index/sample/RazorPagesContacts/Pages/Create.cshtml)]