From 2fdb0f56f86431c0985c5916623c4896d5e6edad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Mon, 3 Jun 2019 14:33:00 +0300 Subject: [PATCH] Update part-II create book. --- docs/en/Tutorials/AspNetCore-Mvc/Part-I.md | 15 +++++++-------- docs/en/Tutorials/AspNetCore-Mvc/Part-II.md | 12 ++++++------ .../images/bookstore-index-js-file-v2.png | Bin 0 -> 2984 bytes .../images/bookstore-index-js-file.png | Bin 3592 -> 0 bytes 4 files changed, 13 insertions(+), 14 deletions(-) create mode 100644 docs/en/Tutorials/AspNetCore-Mvc/images/bookstore-index-js-file-v2.png delete mode 100644 docs/en/Tutorials/AspNetCore-Mvc/images/bookstore-index-js-file.png diff --git a/docs/en/Tutorials/AspNetCore-Mvc/Part-I.md b/docs/en/Tutorials/AspNetCore-Mvc/Part-I.md index a3d1c29550..84626eba61 100644 --- a/docs/en/Tutorials/AspNetCore-Mvc/Part-I.md +++ b/docs/en/Tutorials/AspNetCore-Mvc/Part-I.md @@ -64,7 +64,7 @@ Define the `BookType` enum in the `Acme.BookStore.Domain.Shared` project: ````C# namespace Acme.BookStore { - public enum BookType : byte + public enum BookType { Undefined, Adventure, @@ -336,8 +336,8 @@ Open the `Index.cshtml` and change the content as shown below: ````html @page -@using Acme.BookStore.Pages.Books -@inherits Acme.BookStore.Pages.BookStorePageBase +@using Acme.BookStore.Web.Pages.Books +@inherits Acme.BookStore.Web.Pages.BookStorePageBase @model IndexModel

Books

@@ -388,15 +388,14 @@ When you click to the Books menu item, you are redirected to the new Books page. We will use the [Datatables.net](https://datatables.net/) JQuery plugin to show list of tables on the page. Datatables can completely work via AJAX, it is fast and provides a good user experience. Datatables plugin is configured in the startup template, so you can directly use it in any page without including any style or script file to your page. -##### Index.cshtml Changes +##### Index.cshtml Change the `Pages/Books/Index.cshtml` as following: ````html @page -@using Acme.BookStore.Pages.Books -@inherits Acme.BookStore.Pages.BookStorePageBase -@model IndexModel +@inherits Acme.BookStore.Web.Pages.BookStorePageBase +@model Acme.BookStore.Web.Pages.Books.IndexModel @section scripts { @@ -429,7 +428,7 @@ Change the `Pages/Books/Index.cshtml` as following: Create `index.js` JavaScript file under the `Pages/Books/` folder: -![bookstore-index-js-file](images/bookstore-index-js-file.png) +![bookstore-index-js-file](images/bookstore-index-js-file-v2.png) `index.js` content is shown below: diff --git a/docs/en/Tutorials/AspNetCore-Mvc/Part-II.md b/docs/en/Tutorials/AspNetCore-Mvc/Part-II.md index eeb14db8bb..9ed30338fa 100644 --- a/docs/en/Tutorials/AspNetCore-Mvc/Part-II.md +++ b/docs/en/Tutorials/AspNetCore-Mvc/Part-II.md @@ -2,13 +2,13 @@ ### About this Tutorial -This is the second part of the tutorial series. See all parts: +This is the second part of the ASP.NET Core MVC tutorial series. See all parts: * [Part I: Create the project and a book list page](Part-I.md) * **Part II: Create, Update and Delete books (this tutorial)** * [Part III: Integration Tests](Part-III.md) -You can download the **source code** of the application [from here](https://github.com/volosoft/abp/tree/master/samples/BookStore). +You can access to the **source code** of the application from [the GitHub repository](https://github.com/volosoft/abp/tree/master/samples/BookStore). ### Creating a New Book @@ -30,7 +30,7 @@ Open the `CreateModal.cshtml.cs` file (`CreateModalModel` class) and replace wit using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; -namespace Acme.BookStore.Pages.Books +namespace Acme.BookStore.Web.Pages.Books { public class CreateModalModel : BookStorePageModelBase { @@ -63,9 +63,9 @@ Open the `CreateModal.cshtml` file and paste the code below: ````html @page -@inherits Acme.BookStore.Pages.BookStorePageBase +@inherits Acme.BookStore.Web.Pages.BookStorePageBase @using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal -@model Acme.BookStore.Pages.Books.CreateModalModel +@model Acme.BookStore.Web.Pages.Books.CreateModalModel @{ Layout = null; } @@ -83,7 +83,7 @@ Open the `CreateModal.cshtml` file and paste the code below: * This modal uses `abp-dynamic-form` tag helper to automatically create the form from the `CreateBookViewModel` class. * `abp-model` attribute indicates the model object, the `Book` property in this case. * `data-ajaxForm` attribute makes the form submitting via AJAX, instead of a classic page post. - * `abp-form-content` tag helper is a placeholder to render the form controls (this is optional and needed only if you added some other content in the `abp-dynamic-form` tag, just like in this view). + * `abp-form-content` tag helper is a placeholder to render the form controls (this is optional and needed only if you added some other content in the `abp-dynamic-form` tag, just like in this page). #### Add the "New book" Button diff --git a/docs/en/Tutorials/AspNetCore-Mvc/images/bookstore-index-js-file-v2.png b/docs/en/Tutorials/AspNetCore-Mvc/images/bookstore-index-js-file-v2.png new file mode 100644 index 0000000000000000000000000000000000000000..1ba9a4860010aa781862cd111d6e97c8fa5f0063 GIT binary patch literal 2984 zcmV;Z3s>}sP) zeQX=$9ml`v=t~H!m6|qmskttR!%kGQP|j=!%g`{bC7n)k#kNu}C0SoU{bzQhNh47# z=EUU>r1sDv`9at}Cjq;zeUOaM#sy3Un<~fVH#})cfPkudy$7 zeD>Mp`N)4HkDupvPvq}Czvq0ve6P-IZU=#ohebwDfKb&CeGs%D`XFd=TUn#O{;THO zSGQ(0-k81g^XEP&>v0KsQAU0Ih(=`Q^P&B3WwrA|c3`ePSWX(WsXxbp-CO)}`KCrF zlzH^AZr!>I7cLYY?v1{6^(*gA{`%OnVlfg_WkI{g0()JP4vr|qaI`)=i^Z~U-}4VW z^l;(f?pW347z`B{KOeIHRnghAiRNS?5TnVvKebpa2M+9SXlSV9Z05ppVMz*0Qdr_x zwTX7|QdpA0yxYY|V{SU5QIh;D0MKq;9he+PSOB@tZ;Qq9;)@5CELl?F*(lKN9$PH* zk_-TX%PIf>%Sk%DVx3sN3q70oKpEY2hEcozWr2As90M zTZtU{Sg<&b^{sq(-9p8J{Q{6k zLr@xFvZ-SM@dPHLG0!0HjyT9Jw=}Z#QOe3Obvm;7$9Ls>cmKAgo`e6<3^3=ig?8~C zcp0kz+Rghk$BJIYoxWT+7>;(2Ns>wQT3uuvStuF%k9F(T?c4YK!o(4e;}2*4tMPr? z^5*pqwiO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