├── WizLib ├── Views │ ├── _ViewStart.cshtml │ ├── _ViewImports.cshtml │ ├── Home │ │ ├── Error.cshtml │ │ ├── Privacy.cshtml │ │ └── Index.cshtml │ ├── Shared │ │ ├── _ValidationScriptsPartial.cshtml │ │ └── _Layout.cshtml │ ├── Category │ │ ├── Upsert.cshtml │ │ └── Index.cshtml │ ├── Publisher │ │ ├── Index.cshtml │ │ └── Upsert.cshtml │ ├── Author │ │ ├── Index.cshtml │ │ └── Upsert.cshtml │ └── Book │ │ ├── ManageAuthors.cshtml │ │ ├── Index.cshtml │ │ ├── Upsert.cshtml │ │ └── Details.cshtml ├── wwwroot │ ├── favicon.ico │ ├── js │ │ └── site.js │ ├── lib │ │ ├── jquery-validation-unobtrusive │ │ │ ├── LICENSE.txt │ │ │ └── jquery.validate.unobtrusive.min.js │ │ ├── jquery-validation │ │ │ └── LICENSE.md │ │ ├── bootstrap │ │ │ ├── LICENSE │ │ │ └── dist │ │ │ │ └── css │ │ │ │ ├── bootstrap-reboot.min.css │ │ │ │ └── bootstrap-reboot.css │ │ └── jquery │ │ │ └── LICENSE.txt │ └── css │ │ └── site.css ├── Properties │ ├── serviceDependencies.json │ ├── serviceDependencies.local.json │ └── launchSettings.json ├── appsettings.Development.json ├── appsettings.json ├── Program.cs ├── Controllers │ ├── HomeController.cs │ ├── AuthorController.cs │ ├── PublisherController.cs │ └── CategoryController.cs ├── WizLib.csproj └── Startup.cs ├── WizLib_Model ├── Models │ ├── ErrorViewModel.cs │ ├── BookDetailsFromView.cs │ ├── Category.cs │ ├── Genre.cs │ ├── Fluent_BookAuthor.cs │ ├── Fluent_BookDetail.cs │ ├── Fluent_Publisher.cs │ ├── BookAuthor.cs │ ├── BookDetail.cs │ ├── Publisher.cs │ ├── Fluent_Author.cs │ ├── Fluent_Book.cs │ ├── Author.cs │ └── Book.cs ├── WizLib_Model.csproj └── ViewModels │ ├── BookVM.cs │ └── BookAuthorVM.cs ├── WizLib_DataAccess ├── Migrations │ ├── 20220308043231_init.cs │ ├── 20200511200154_AddRawCategoryToTable.cs │ ├── 20200510180042_AddDisplayOrderToGenreTable.cs │ ├── 20200510181254_removeDisplayOrderColFromGenreTable.cs │ ├── 20200510175057_AddGenreTableToDb.cs │ ├── 20200510162306_AddCategoryTableToDb.cs │ ├── 20200510191454_AddMaxLengthToISBN.cs │ ├── 20200510225316_AddCategoryWithMixOfDaAndFluent.cs │ ├── 20200512210702_AddSprocAndView.cs │ ├── 20200510191005_AddBookTableTodb.cs │ ├── 20200510180503_changeNameToGenreNameinGenreTable.cs │ ├── 20200510215532_AddFluentBookDetailsToDb.cs │ ├── 20200510190255_ChangeTableAndColumnNamesOfGenreTb.cs │ ├── 20200510202247_AddRelationCategoryAndBookTable.cs │ ├── 20200510205743_AddOneToManyBookAndPublisherRelation.cs │ ├── 20200510162306_AddCategoryTableToDb.Designer.cs │ ├── 20200511032912_addOneToManyFluentBookAndPublisher.cs │ ├── 20200511031748_addOneToOneFluentBookAndBookDetail.cs │ ├── 20200510192624_updateAuthorTablePrimaryKeyName.cs │ ├── 20200510202045_changePrimaryKeyForCategoryTable.cs │ ├── 20200511034044_addManyToManyBookAndAuthor.cs │ ├── 20200510192522_AddAuthorAndPublisherTableToDb.cs │ ├── 20200510175057_AddGenreTableToDb.Designer.cs │ ├── 20200510211715_AddManyToManyBookAndAuthorRelationWithBookAuthor.cs │ ├── 20200510181254_removeDisplayOrderColFromGenreTable.Designer.cs │ ├── 20200510220115_BookDetailsToDb.cs │ ├── 20200510190255_ChangeTableAndColumnNamesOfGenreTb.Designer.cs │ ├── 20200510180042_AddDisplayOrderToGenreTable.Designer.cs │ ├── 20200510180503_changeNameToGenreNameinGenreTable.Designer.cs │ ├── 20200511233435_MakeBookDetailNullableInBookTable.cs │ ├── 20200510224807_FluentAPIModels.cs │ ├── 20200510191005_AddBookTableTodb.Designer.cs │ ├── 20200510191454_AddMaxLengthToISBN.Designer.cs │ ├── 20200511034621_addManyToManyBookAndAuthorCorrection.cs │ ├── 20200510211855_AddForeignKeyAnnotationToBookAuthor.cs │ ├── 20200510204054_AddOneToOneBookAndBookDetail.cs │ ├── 20200510192624_updateAuthorTablePrimaryKeyName.Designer.cs │ ├── 20200510192522_AddAuthorAndPublisherTableToDb.Designer.cs │ ├── 20200510202045_changePrimaryKeyForCategoryTable.Designer.cs │ ├── 20200510202247_AddRelationCategoryAndBookTable.Designer.cs │ ├── 20200510204054_AddOneToOneBookAndBookDetail.Designer.cs │ ├── 20200510205743_AddOneToManyBookAndPublisherRelation.Designer.cs │ ├── 20200510211855_AddForeignKeyAnnotationToBookAuthor.Designer.cs │ └── 20200510211715_AddManyToManyBookAndAuthorRelationWithBookAuthor.Designer.cs ├── FluentConfig │ ├── FluentBookDetailsConfig.cs │ ├── FluentPublisherConfig.cs │ ├── FluentAuthorConfig.cs │ ├── FluentBookAuthorConfig.cs │ └── FluentBookConfig.cs ├── WizLib_DataAccess.csproj └── Data │ └── ApplicationDbContext.cs ├── WizLib.sln ├── .gitattributes └── .gitignore /WizLib/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } -------------------------------------------------------------------------------- /WizLib/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirzaf/WizLib_EFCore/HEAD/WizLib/wwwroot/favicon.ico -------------------------------------------------------------------------------- /WizLib/Views/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using WizLib 2 | @using WizLib_Model.Models 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers -------------------------------------------------------------------------------- /WizLib/Properties/serviceDependencies.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "secrets1": { 4 | "type": "secrets" 5 | } 6 | } 7 | } -------------------------------------------------------------------------------- /WizLib/Properties/serviceDependencies.local.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "secrets1": { 4 | "type": "secrets.user" 5 | } 6 | } 7 | } -------------------------------------------------------------------------------- /WizLib/Views/Home/Error.cshtml: -------------------------------------------------------------------------------- 1 | @model ErrorViewModel 2 | 3 | @{ 4 | ViewBag.Title = "title"; 5 | Layout = "_Layout"; 6 | } 7 | 8 |
Use this page to detail your site's privacy policy.
-------------------------------------------------------------------------------- /WizLib/Views/Shared/_ValidationScriptsPartial.cshtml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /WizLib/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } -------------------------------------------------------------------------------- /WizLib_Model/Models/ErrorViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace WizLib_Model.Models; 2 | 3 | public class ErrorViewModel 4 | { 5 | public string RequestId { get; set; } 6 | 7 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 8 | } -------------------------------------------------------------------------------- /WizLib_Model/Models/BookDetailsFromView.cs: -------------------------------------------------------------------------------- 1 | namespace WizLib_Model.Models; 2 | 3 | public class BookDetailsFromView 4 | { 5 | public string ISBN { get; set; } 6 | public string Title { get; set; } 7 | public double Price { get; set; } 8 | } -------------------------------------------------------------------------------- /WizLib/wwwroot/js/site.js: -------------------------------------------------------------------------------- 1 | // Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification 2 | // for details on configuring this project to bundle and minify static web assets. 3 | 4 | // Write your JavaScript code. -------------------------------------------------------------------------------- /WizLib_Model/Models/Category.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace WizLib_Model.Models; 4 | 5 | public class Category 6 | { 7 | [Key] public int Category_Id { get; set; } 8 | 9 | public string Name { get; set; } 10 | } -------------------------------------------------------------------------------- /WizLib/Views/Home/Index.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Home Page"; 3 | } 4 | 5 |Learn about building Web apps with ASP.NET Core.
8 || 21 | Publisher Name 22 | | 23 |24 | Location 25 | | 26 |27 | |
|---|---|---|
| 32 | @item.Name 33 | | 34 |35 | @item.Location 36 | | 37 |38 | 39 | Edit 40 | 41 | 42 | 43 | Delete 44 | 45 | | 46 |
No publisher exists...
53 | } 54 || 21 | Full Name 22 | | 23 |24 | Birth Date 25 | | 26 |27 | Location 28 | | 29 |30 | |
|---|---|---|---|
| 35 | @item.FullName 36 | | 37 |38 | @item.BirthDate.ToShortDateString() 39 | | 40 |41 | @item.Location 42 | | 43 |44 | 45 | Edit 46 | 47 | 48 | 49 | Delete 50 | 51 | | 52 |
No author exists...
59 | } 60 || 36 | Category Name 37 | | 38 |39 | |
|---|---|
| 44 | @item.Name 45 | | 46 |47 | 48 | Edit 49 | 50 | 51 | 52 | Delete 53 | 54 | | 55 |
No category exists...
62 | } 63 || 24 | Title 25 | | 26 |27 | Price 28 | | 29 |30 | Publisher 31 | | 32 |33 | Authors 34 | | 35 |36 | |
|---|---|---|---|---|
| 41 | @item.Title 42 | | 43 |44 | @item.Price 45 | | 46 |47 | @item.Publisher.Name 48 | | 49 |50 | @{ 51 | var authors = ""; 52 | } 53 | @foreach (BookAuthor auth in item.BookAuthors) 54 | { 55 | authors += auth.Author.FullName + ", "; 56 | } 57 | @authors.Trim().TrimEnd(',') 58 | | 59 |60 | 61 | Edit 62 | 63 | 64 | Details 65 | 66 | 67 | Delete 68 | 69 | 70 | Authors 71 | 72 | 73 | | 74 |
No publisher exists...
81 | } 82 |