├── Ch02 ├── 02_01_End │ ├── TopsyTurvyCakes.sln │ └── TopsyTurvyCakes │ │ ├── Models │ │ ├── IRecipesService.cs │ │ ├── Recipe.cs │ │ ├── RecipesDbContext.SeedData.cs │ │ ├── RecipesDbContext.cs │ │ └── RecipesService.cs │ │ ├── Pages │ │ └── .gitignore │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── TopsyTurvyCakes.csproj │ │ └── wwwroot │ │ └── .gitignore ├── 02_02_Begin │ ├── TopsyTurvyCakes.sln │ └── TopsyTurvyCakes │ │ ├── Models │ │ ├── IRecipesService.cs │ │ ├── Recipe.cs │ │ ├── RecipesDbContext.SeedData.cs │ │ ├── RecipesDbContext.cs │ │ └── RecipesService.cs │ │ ├── Pages │ │ └── .gitignore │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── TopsyTurvyCakes.csproj │ │ └── wwwroot │ │ └── .gitignore ├── 02_02_End │ ├── TopsyTurvyCakes.sln │ └── TopsyTurvyCakes │ │ ├── Models │ │ ├── IRecipesService.cs │ │ ├── Recipe.cs │ │ ├── RecipesDbContext.SeedData.cs │ │ ├── RecipesDbContext.cs │ │ └── RecipesService.cs │ │ ├── Pages │ │ ├── Index.cshtml │ │ └── Recipe.cshtml │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── TopsyTurvyCakes.csproj │ │ └── wwwroot │ │ └── .gitignore ├── 02_03_Begin │ ├── TopsyTurvyCakes.sln │ └── TopsyTurvyCakes │ │ ├── Models │ │ ├── IRecipesService.cs │ │ ├── Recipe.cs │ │ ├── RecipesDbContext.SeedData.cs │ │ ├── RecipesDbContext.cs │ │ └── RecipesService.cs │ │ ├── Pages │ │ ├── Index.cshtml │ │ └── Recipe.cshtml │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── TopsyTurvyCakes.csproj │ │ └── wwwroot │ │ └── .gitignore ├── 02_03_End │ ├── TopsyTurvyCakes.sln │ └── TopsyTurvyCakes │ │ ├── Models │ │ ├── IRecipesService.cs │ │ ├── Recipe.cs │ │ ├── RecipesDbContext.SeedData.cs │ │ ├── RecipesDbContext.cs │ │ └── RecipesService.cs │ │ ├── Pages │ │ ├── Index.cshtml │ │ └── Recipe.cshtml │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── TopsyTurvyCakes.csproj │ │ └── wwwroot │ │ ├── bootstrap.css │ │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ │ └── site.css ├── 02_04_Begin │ ├── TopsyTurvyCakes.sln │ └── TopsyTurvyCakes │ │ ├── Models │ │ ├── IRecipesService.cs │ │ ├── Recipe.cs │ │ ├── RecipesDbContext.SeedData.cs │ │ ├── RecipesDbContext.cs │ │ └── RecipesService.cs │ │ ├── Pages │ │ ├── Index.cshtml │ │ └── Recipe.cshtml │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── TopsyTurvyCakes.csproj │ │ └── wwwroot │ │ ├── bootstrap.css │ │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ │ └── site.css ├── 02_04_End │ ├── TopsyTurvyCakes.sln │ └── TopsyTurvyCakes │ │ ├── Models │ │ ├── IRecipesService.cs │ │ ├── Recipe.cs │ │ ├── RecipesDbContext.SeedData.cs │ │ ├── RecipesDbContext.cs │ │ └── RecipesService.cs │ │ ├── Pages │ │ ├── Index.cshtml │ │ └── Recipe.cshtml │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── TopsyTurvyCakes.csproj │ │ └── wwwroot │ │ ├── bootstrap.css │ │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ │ └── site.css ├── 02_05_Begin │ ├── TopsyTurvyCakes.sln │ └── TopsyTurvyCakes │ │ ├── Models │ │ ├── IRecipesService.cs │ │ ├── Recipe.cs │ │ ├── RecipesDbContext.SeedData.cs │ │ ├── RecipesDbContext.cs │ │ └── RecipesService.cs │ │ ├── Pages │ │ ├── Index.cshtml │ │ └── Recipe.cshtml │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── TopsyTurvyCakes.csproj │ │ └── wwwroot │ │ ├── bootstrap.css │ │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ │ └── site.css ├── 02_05_End │ ├── TopsyTurvyCakes.sln │ └── TopsyTurvyCakes │ │ ├── Models │ │ ├── IRecipesService.cs │ │ ├── Recipe.cs │ │ ├── RecipesDbContext.SeedData.cs │ │ ├── RecipesDbContext.cs │ │ └── RecipesService.cs │ │ ├── Pages │ │ ├── Index.cshtml │ │ └── Recipe.cshtml │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── TopsyTurvyCakes.csproj │ │ └── wwwroot │ │ ├── bootstrap.css │ │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ │ └── site.css ├── 02_06_Begin │ ├── TopsyTurvyCakes.sln │ └── TopsyTurvyCakes │ │ ├── Models │ │ ├── IRecipesService.cs │ │ ├── Recipe.cs │ │ ├── RecipesDbContext.SeedData.cs │ │ ├── RecipesDbContext.cs │ │ └── RecipesService.cs │ │ ├── Pages │ │ ├── Index.cshtml │ │ └── Recipe.cshtml │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── TopsyTurvyCakes.csproj │ │ └── wwwroot │ │ ├── bootstrap.css │ │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ │ └── site.css ├── 02_06_End │ ├── TopsyTurvyCakes.sln │ └── TopsyTurvyCakes │ │ ├── Models │ │ ├── IRecipesService.cs │ │ ├── Recipe.cs │ │ ├── RecipesDbContext.SeedData.cs │ │ ├── RecipesDbContext.cs │ │ └── RecipesService.cs │ │ ├── Pages │ │ ├── Index.cshtml │ │ └── Recipe.cshtml │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── TopsyTurvyCakes.csproj │ │ └── wwwroot │ │ ├── bootstrap.css │ │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ │ └── site.css └── artifacts │ ├── Index.html │ ├── Models │ ├── IRecipesService.cs │ ├── Recipe.cs │ ├── RecipesDbContext.SeedData.cs │ ├── RecipesDbContext.cs │ └── RecipesService.cs │ ├── Recipe.html │ └── wwwroot │ ├── bootstrap.css │ ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 │ └── site.css ├── Ch03 ├── 03_01_Begin │ ├── TopsyTurvyCakes.sln │ └── TopsyTurvyCakes │ │ ├── Models │ │ ├── IRecipesService.cs │ │ ├── Recipe.cs │ │ ├── RecipesDbContext.SeedData.cs │ │ ├── RecipesDbContext.cs │ │ └── RecipesService.cs │ │ ├── Pages │ │ ├── Index.cshtml │ │ └── Recipe.cshtml │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── TopsyTurvyCakes.csproj │ │ └── wwwroot │ │ ├── bootstrap.css │ │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ │ └── site.css ├── 03_01_End │ ├── TopsyTurvyCakes.sln │ └── TopsyTurvyCakes │ │ ├── Models │ │ ├── IRecipesService.cs │ │ ├── Recipe.cs │ │ ├── RecipesDbContext.SeedData.cs │ │ ├── RecipesDbContext.cs │ │ └── RecipesService.cs │ │ ├── Pages │ │ ├── Index.cshtml │ │ ├── Recipe.cshtml │ │ └── _Layout.cshtml │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── TopsyTurvyCakes.csproj │ │ └── wwwroot │ │ ├── bootstrap.css │ │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ │ └── site.css ├── 03_02_Begin │ ├── TopsyTurvyCakes.sln │ └── TopsyTurvyCakes │ │ ├── Models │ │ ├── IRecipesService.cs │ │ ├── Recipe.cs │ │ ├── RecipesDbContext.SeedData.cs │ │ ├── RecipesDbContext.cs │ │ └── RecipesService.cs │ │ ├── Pages │ │ ├── Index.cshtml │ │ ├── Recipe.cshtml │ │ └── _Layout.cshtml │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── TopsyTurvyCakes.csproj │ │ └── wwwroot │ │ ├── bootstrap.css │ │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ │ └── site.css ├── 03_02_End │ ├── TopsyTurvyCakes.sln │ └── TopsyTurvyCakes │ │ ├── Models │ │ ├── IRecipesService.cs │ │ ├── Recipe.cs │ │ ├── RecipesDbContext.SeedData.cs │ │ ├── RecipesDbContext.cs │ │ └── RecipesService.cs │ │ ├── Pages │ │ ├── Index.cshtml │ │ ├── Recipe.cshtml │ │ └── _Layout.cshtml │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── TopsyTurvyCakes.csproj │ │ └── wwwroot │ │ ├── bootstrap.css │ │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ │ └── site.css ├── 03_03_Begin │ ├── TopsyTurvyCakes.sln │ └── TopsyTurvyCakes │ │ ├── Models │ │ ├── IRecipesService.cs │ │ ├── Recipe.cs │ │ ├── RecipesDbContext.SeedData.cs │ │ ├── RecipesDbContext.cs │ │ └── RecipesService.cs │ │ ├── Pages │ │ ├── Index.cshtml │ │ ├── Recipe.cshtml │ │ └── _Layout.cshtml │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── TopsyTurvyCakes.csproj │ │ └── wwwroot │ │ ├── bootstrap.css │ │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ │ └── site.css ├── 03_03_End │ ├── TopsyTurvyCakes.sln │ └── TopsyTurvyCakes │ │ ├── Models │ │ ├── IRecipesService.cs │ │ ├── Recipe.cs │ │ ├── RecipesDbContext.SeedData.cs │ │ ├── RecipesDbContext.cs │ │ └── RecipesService.cs │ │ ├── Pages │ │ ├── Index.cshtml │ │ ├── Recipe.cshtml │ │ └── _Layout.cshtml │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── TopsyTurvyCakes.csproj │ │ └── wwwroot │ │ ├── bootstrap.css │ │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ │ └── site.css ├── 03_04_Begin │ ├── TopsyTurvyCakes.sln │ └── TopsyTurvyCakes │ │ ├── Models │ │ ├── IRecipesService.cs │ │ ├── Recipe.cs │ │ ├── RecipesDbContext.SeedData.cs │ │ ├── RecipesDbContext.cs │ │ └── RecipesService.cs │ │ ├── Pages │ │ ├── Index.cshtml │ │ ├── Recipe.cshtml │ │ └── _Layout.cshtml │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── TopsyTurvyCakes.csproj │ │ └── wwwroot │ │ ├── bootstrap.css │ │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ │ └── site.css └── 03_04_End │ ├── TopsyTurvyCakes.sln │ └── TopsyTurvyCakes │ ├── Models │ ├── IRecipesService.cs │ ├── Recipe.cs │ ├── RecipesDbContext.SeedData.cs │ ├── RecipesDbContext.cs │ └── RecipesService.cs │ ├── Pages │ ├── Index.cshtml │ ├── Recipe.cshtml │ ├── _Layout.cshtml │ ├── _ViewImports.cshtml │ └── _ViewStart.cshtml │ ├── Program.cs │ ├── Properties │ └── launchSettings.json │ ├── Startup.cs │ ├── TopsyTurvyCakes.csproj │ └── wwwroot │ ├── bootstrap.css │ ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 │ └── site.css ├── Ch04 ├── 04_02_Begin │ ├── TopsyTurvyCakes.sln │ └── TopsyTurvyCakes │ │ ├── Models │ │ ├── IRecipesService.cs │ │ ├── Recipe.cs │ │ ├── RecipesDbContext.SeedData.cs │ │ ├── RecipesDbContext.cs │ │ └── RecipesService.cs │ │ ├── Pages │ │ ├── Index.cshtml │ │ ├── Recipe.cshtml │ │ ├── _Layout.cshtml │ │ ├── _ViewImports.cshtml │ │ └── _ViewStart.cshtml │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── TopsyTurvyCakes.csproj │ │ └── wwwroot │ │ ├── bootstrap.css │ │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ │ └── site.css ├── 04_02_End │ ├── TopsyTurvyCakes.sln │ └── TopsyTurvyCakes │ │ ├── Models │ │ ├── IRecipesService.cs │ │ ├── Recipe.cs │ │ ├── RecipesDbContext.SeedData.cs │ │ ├── RecipesDbContext.cs │ │ └── RecipesService.cs │ │ ├── Pages │ │ ├── Admin │ │ │ ├── AddEditRecipe.cshtml │ │ │ └── AddEditRecipe.cshtml.cs │ │ ├── Index.cshtml │ │ ├── Recipe.cshtml │ │ ├── _Layout.cshtml │ │ ├── _ViewImports.cshtml │ │ └── _ViewStart.cshtml │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── TopsyTurvyCakes.csproj │ │ └── wwwroot │ │ ├── bootstrap.css │ │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ │ └── site.css ├── 04_03_Begin │ ├── TopsyTurvyCakes.sln │ └── TopsyTurvyCakes │ │ ├── Models │ │ ├── IRecipesService.cs │ │ ├── Recipe.cs │ │ ├── RecipesDbContext.SeedData.cs │ │ ├── RecipesDbContext.cs │ │ └── RecipesService.cs │ │ ├── Pages │ │ ├── Admin │ │ │ ├── AddEditRecipe.cshtml │ │ │ └── AddEditRecipe.cshtml.cs │ │ ├── Index.cshtml │ │ ├── Recipe.cshtml │ │ ├── _Layout.cshtml │ │ ├── _ViewImports.cshtml │ │ └── _ViewStart.cshtml │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── TopsyTurvyCakes.csproj │ │ └── wwwroot │ │ ├── bootstrap.css │ │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ │ └── site.css └── 04_03_End │ ├── TopsyTurvyCakes.sln │ └── TopsyTurvyCakes │ ├── Models │ ├── IRecipesService.cs │ ├── Recipe.cs │ ├── RecipesDbContext.SeedData.cs │ ├── RecipesDbContext.cs │ └── RecipesService.cs │ ├── Pages │ ├── Admin │ │ ├── AddEditRecipe.cshtml │ │ └── AddEditRecipe.cshtml.cs │ ├── Index.cshtml │ ├── Recipe.cshtml │ ├── _Layout.cshtml │ ├── _ViewImports.cshtml │ └── _ViewStart.cshtml │ ├── Program.cs │ ├── Properties │ └── launchSettings.json │ ├── Startup.cs │ ├── TopsyTurvyCakes.csproj │ └── wwwroot │ ├── bootstrap.css │ ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 │ └── site.css ├── Ch05 ├── 05_01_Begin │ ├── TopsyTurvyCakes.sln │ └── TopsyTurvyCakes │ │ ├── Models │ │ ├── IRecipesService.cs │ │ ├── Recipe.cs │ │ ├── RecipesDbContext.SeedData.cs │ │ ├── RecipesDbContext.cs │ │ └── RecipesService.cs │ │ ├── Pages │ │ ├── Admin │ │ │ ├── AddEditRecipe.cshtml │ │ │ └── AddEditRecipe.cshtml.cs │ │ ├── Index.cshtml │ │ ├── Recipe.cshtml │ │ ├── _Layout.cshtml │ │ ├── _ViewImports.cshtml │ │ └── _ViewStart.cshtml │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── TopsyTurvyCakes.csproj │ │ └── wwwroot │ │ ├── bootstrap.css │ │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ │ └── site.css ├── 05_01_End │ ├── TopsyTurvyCakes.sln │ └── TopsyTurvyCakes │ │ ├── Models │ │ ├── IRecipesService.cs │ │ ├── Recipe.cs │ │ ├── RecipesDbContext.SeedData.cs │ │ ├── RecipesDbContext.cs │ │ └── RecipesService.cs │ │ ├── Pages │ │ ├── Admin │ │ │ ├── AddEditRecipe.cshtml │ │ │ └── AddEditRecipe.cshtml.cs │ │ ├── Index.cshtml │ │ ├── Recipe.cshtml │ │ ├── _Layout.cshtml │ │ ├── _ViewImports.cshtml │ │ └── _ViewStart.cshtml │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── TopsyTurvyCakes.csproj │ │ └── wwwroot │ │ ├── bootstrap.css │ │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ │ └── site.css ├── 05_02_Begin │ ├── TopsyTurvyCakes.sln │ └── TopsyTurvyCakes │ │ ├── Models │ │ ├── IRecipesService.cs │ │ ├── Recipe.cs │ │ ├── RecipesDbContext.SeedData.cs │ │ ├── RecipesDbContext.cs │ │ └── RecipesService.cs │ │ ├── Pages │ │ ├── Admin │ │ │ ├── AddEditRecipe.cshtml │ │ │ └── AddEditRecipe.cshtml.cs │ │ ├── Index.cshtml │ │ ├── Recipe.cshtml │ │ ├── _Layout.cshtml │ │ ├── _ViewImports.cshtml │ │ └── _ViewStart.cshtml │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── TopsyTurvyCakes.csproj │ │ └── wwwroot │ │ ├── bootstrap.css │ │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ │ └── site.css ├── 05_02_End │ ├── TopsyTurvyCakes.sln │ └── TopsyTurvyCakes │ │ ├── Models │ │ ├── IRecipesService.cs │ │ ├── Recipe.cs │ │ ├── RecipesDbContext.SeedData.cs │ │ ├── RecipesDbContext.cs │ │ └── RecipesService.cs │ │ ├── Pages │ │ ├── Admin │ │ │ ├── AddEditRecipe.cshtml │ │ │ └── AddEditRecipe.cshtml.cs │ │ ├── Index.cshtml │ │ ├── Recipe.cshtml │ │ ├── _Layout.cshtml │ │ ├── _ViewImports.cshtml │ │ └── _ViewStart.cshtml │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── TopsyTurvyCakes.csproj │ │ └── wwwroot │ │ ├── bootstrap.css │ │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ │ └── site.css ├── 05_03_Begin │ ├── TopsyTurvyCakes.sln │ └── TopsyTurvyCakes │ │ ├── Models │ │ ├── IRecipesService.cs │ │ ├── Recipe.cs │ │ ├── RecipesDbContext.SeedData.cs │ │ ├── RecipesDbContext.cs │ │ └── RecipesService.cs │ │ ├── Pages │ │ ├── Admin │ │ │ ├── AddEditRecipe.cshtml │ │ │ └── AddEditRecipe.cshtml.cs │ │ ├── Index.cshtml │ │ ├── Recipe.cshtml │ │ ├── _Layout.cshtml │ │ ├── _ViewImports.cshtml │ │ └── _ViewStart.cshtml │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── TopsyTurvyCakes.csproj │ │ └── wwwroot │ │ ├── bootstrap.css │ │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ │ └── site.css ├── 05_03_End │ ├── TopsyTurvyCakes.sln │ └── TopsyTurvyCakes │ │ ├── Models │ │ ├── IRecipesService.cs │ │ ├── Recipe.cs │ │ ├── RecipesDbContext.SeedData.cs │ │ ├── RecipesDbContext.cs │ │ └── RecipesService.cs │ │ ├── Pages │ │ ├── Admin │ │ │ ├── AddEditRecipe.cshtml │ │ │ └── AddEditRecipe.cshtml.cs │ │ ├── Index.cshtml │ │ ├── Recipe.cshtml │ │ ├── _Layout.cshtml │ │ ├── _ViewImports.cshtml │ │ └── _ViewStart.cshtml │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── TopsyTurvyCakes.csproj │ │ └── wwwroot │ │ ├── bootstrap.css │ │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ │ └── site.css ├── 05_04_Begin │ ├── TopsyTurvyCakes.sln │ └── TopsyTurvyCakes │ │ ├── Models │ │ ├── IRecipesService.cs │ │ ├── Recipe.cs │ │ ├── RecipesDbContext.SeedData.cs │ │ ├── RecipesDbContext.cs │ │ └── RecipesService.cs │ │ ├── Pages │ │ ├── Admin │ │ │ ├── AddEditRecipe.cshtml │ │ │ └── AddEditRecipe.cshtml.cs │ │ ├── Index.cshtml │ │ ├── Recipe.cshtml │ │ ├── _Layout.cshtml │ │ ├── _ViewImports.cshtml │ │ └── _ViewStart.cshtml │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── TopsyTurvyCakes.csproj │ │ └── wwwroot │ │ ├── bootstrap.css │ │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ │ └── site.css ├── 05_04_End │ ├── TopsyTurvyCakes.sln │ └── TopsyTurvyCakes │ │ ├── Models │ │ ├── IRecipesService.cs │ │ ├── Recipe.cs │ │ ├── RecipesDbContext.SeedData.cs │ │ ├── RecipesDbContext.cs │ │ └── RecipesService.cs │ │ ├── Pages │ │ ├── Admin │ │ │ ├── AddEditRecipe.cshtml │ │ │ └── AddEditRecipe.cshtml.cs │ │ ├── Index.cshtml │ │ ├── Recipe.cshtml │ │ ├── _Layout.cshtml │ │ ├── _ViewImports.cshtml │ │ └── _ViewStart.cshtml │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── TopsyTurvyCakes.csproj │ │ └── wwwroot │ │ ├── bootstrap.css │ │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ │ └── site.css ├── 05_Challenge │ ├── TopsyTurvyCakes.sln │ └── TopsyTurvyCakes │ │ ├── Models │ │ ├── IRecipesService.cs │ │ ├── Recipe.cs │ │ ├── RecipesDbContext.SeedData.cs │ │ ├── RecipesDbContext.cs │ │ └── RecipesService.cs │ │ ├── Pages │ │ ├── Admin │ │ │ ├── AddEditRecipe.cshtml │ │ │ └── AddEditRecipe.cshtml.cs │ │ ├── Index.cshtml │ │ ├── Recipe.cshtml │ │ ├── _Layout.cshtml │ │ ├── _ViewImports.cshtml │ │ └── _ViewStart.cshtml │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── TopsyTurvyCakes.csproj │ │ └── wwwroot │ │ ├── bootstrap.css │ │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ │ └── site.css └── 05_Solution │ ├── TopsyTurvyCakes.sln │ └── TopsyTurvyCakes │ ├── Models │ ├── IRecipesService.cs │ ├── Recipe.cs │ ├── RecipesDbContext.SeedData.cs │ ├── RecipesDbContext.cs │ └── RecipesService.cs │ ├── Pages │ ├── Admin │ │ ├── AddEditRecipe.cshtml │ │ └── AddEditRecipe.cshtml.cs │ ├── Index.cshtml │ ├── Recipe.cshtml │ ├── _Layout.cshtml │ ├── _ViewImports.cshtml │ └── _ViewStart.cshtml │ ├── Program.cs │ ├── Properties │ └── launchSettings.json │ ├── Startup.cs │ ├── TopsyTurvyCakes.csproj │ └── wwwroot │ ├── bootstrap.css │ ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 │ └── site.css └── Ch06 ├── 06_01_Begin ├── TopsyTurvyCakes.sln └── TopsyTurvyCakes │ ├── Models │ ├── IRecipesService.cs │ ├── Recipe.cs │ ├── RecipesDbContext.SeedData.cs │ ├── RecipesDbContext.cs │ └── RecipesService.cs │ ├── Pages │ ├── Admin │ │ ├── AddEditRecipe.cshtml │ │ └── AddEditRecipe.cshtml.cs │ ├── Index.cshtml │ ├── Recipe.cshtml │ ├── _Layout.cshtml │ ├── _ViewImports.cshtml │ └── _ViewStart.cshtml │ ├── Program.cs │ ├── Properties │ └── launchSettings.json │ ├── Startup.cs │ ├── TopsyTurvyCakes.csproj │ └── wwwroot │ ├── bootstrap.css │ ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 │ └── site.css ├── 06_01_End ├── TopsyTurvyCakes.sln └── TopsyTurvyCakes │ ├── Models │ ├── IRecipesService.cs │ ├── Recipe.cs │ ├── RecipesDbContext.SeedData.cs │ ├── RecipesDbContext.cs │ └── RecipesService.cs │ ├── Pages │ ├── Admin │ │ ├── AddEditRecipe.cshtml │ │ └── AddEditRecipe.cshtml.cs │ ├── Index.cshtml │ ├── Recipe.cshtml │ ├── _Layout.cshtml │ ├── _ViewImports.cshtml │ └── _ViewStart.cshtml │ ├── Program.cs │ ├── Properties │ └── launchSettings.json │ ├── Startup.cs │ ├── TopsyTurvyCakes.csproj │ └── wwwroot │ ├── bootstrap.css │ ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 │ └── site.css ├── 06_02_Begin ├── TopsyTurvyCakes.sln └── TopsyTurvyCakes │ ├── Models │ ├── IRecipesService.cs │ ├── Recipe.cs │ ├── RecipesDbContext.SeedData.cs │ ├── RecipesDbContext.cs │ └── RecipesService.cs │ ├── Pages │ ├── Admin │ │ ├── AddEditRecipe.cshtml │ │ └── AddEditRecipe.cshtml.cs │ ├── Index.cshtml │ ├── Recipe.cshtml │ ├── _Layout.cshtml │ ├── _ViewImports.cshtml │ └── _ViewStart.cshtml │ ├── Program.cs │ ├── Properties │ └── launchSettings.json │ ├── Startup.cs │ ├── TopsyTurvyCakes.csproj │ └── wwwroot │ ├── bootstrap.css │ ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 │ └── site.css ├── 06_02_End ├── TopsyTurvyCakes.sln └── TopsyTurvyCakes │ ├── Models │ ├── IRecipesService.cs │ ├── Recipe.cs │ ├── RecipesDbContext.SeedData.cs │ ├── RecipesDbContext.cs │ └── RecipesService.cs │ ├── Pages │ ├── Admin │ │ ├── AddEditRecipe.cshtml │ │ └── AddEditRecipe.cshtml.cs │ ├── Index.cshtml │ ├── Recipe.cshtml │ ├── _Layout.cshtml │ ├── _ViewImports.cshtml │ └── _ViewStart.cshtml │ ├── Program.cs │ ├── Properties │ └── launchSettings.json │ ├── Startup.cs │ ├── TopsyTurvyCakes.csproj │ └── wwwroot │ ├── bootstrap.css │ ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 │ └── site.css ├── 06_03_Begin ├── TopsyTurvyCakes.sln └── TopsyTurvyCakes │ ├── Models │ ├── IRecipesService.cs │ ├── Recipe.cs │ ├── RecipesDbContext.SeedData.cs │ ├── RecipesDbContext.cs │ └── RecipesService.cs │ ├── Pages │ ├── Admin │ │ ├── AddEditRecipe.cshtml │ │ └── AddEditRecipe.cshtml.cs │ ├── Index.cshtml │ ├── Recipe.cshtml │ ├── _Layout.cshtml │ ├── _ViewImports.cshtml │ └── _ViewStart.cshtml │ ├── Program.cs │ ├── Properties │ └── launchSettings.json │ ├── Startup.cs │ ├── TopsyTurvyCakes.csproj │ └── wwwroot │ ├── bootstrap.css │ ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 │ └── site.css ├── 06_03_End ├── TopsyTurvyCakes.sln └── TopsyTurvyCakes │ ├── Models │ ├── IRecipesService.cs │ ├── Recipe.cs │ ├── RecipesDbContext.SeedData.cs │ ├── RecipesDbContext.cs │ └── RecipesService.cs │ ├── Pages │ ├── Account │ │ ├── Login.cshtml │ │ ├── Login.cshtml.cs │ │ ├── Profile.cshtml │ │ └── Profile.cshtml.cs │ ├── Admin │ │ ├── AddEditRecipe.cshtml │ │ └── AddEditRecipe.cshtml.cs │ ├── Index.cshtml │ ├── Recipe.cshtml │ ├── _Layout.cshtml │ ├── _ViewImports.cshtml │ └── _ViewStart.cshtml │ ├── Program.cs │ ├── Properties │ └── launchSettings.json │ ├── Startup.cs │ ├── TopsyTurvyCakes.csproj │ └── wwwroot │ ├── bootstrap.css │ ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 │ └── site.css ├── 06_04_Begin ├── TopsyTurvyCakes.sln └── TopsyTurvyCakes │ ├── Models │ ├── IRecipesService.cs │ ├── Recipe.cs │ ├── RecipesDbContext.SeedData.cs │ ├── RecipesDbContext.cs │ └── RecipesService.cs │ ├── Pages │ ├── Account │ │ ├── Login.cshtml │ │ ├── Login.cshtml.cs │ │ ├── Profile.cshtml │ │ └── Profile.cshtml.cs │ ├── Admin │ │ ├── AddEditRecipe.cshtml │ │ └── AddEditRecipe.cshtml.cs │ ├── Index.cshtml │ ├── Recipe.cshtml │ ├── _Layout.cshtml │ ├── _ViewImports.cshtml │ └── _ViewStart.cshtml │ ├── Program.cs │ ├── Properties │ └── launchSettings.json │ ├── Startup.cs │ ├── TopsyTurvyCakes.csproj │ └── wwwroot │ ├── bootstrap.css │ ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 │ └── site.css ├── 06_04_End ├── TopsyTurvyCakes.sln └── TopsyTurvyCakes │ ├── Models │ ├── IRecipesService.cs │ ├── Recipe.cs │ ├── RecipesDbContext.SeedData.cs │ ├── RecipesDbContext.cs │ └── RecipesService.cs │ ├── Pages │ ├── Account │ │ ├── Login.cshtml │ │ ├── Login.cshtml.cs │ │ ├── Profile.cshtml │ │ └── Profile.cshtml.cs │ ├── Admin │ │ ├── AddEditRecipe.cshtml │ │ └── AddEditRecipe.cshtml.cs │ ├── Index.cshtml │ ├── Recipe.cshtml │ ├── _Layout.cshtml │ ├── _ViewImports.cshtml │ └── _ViewStart.cshtml │ ├── Program.cs │ ├── Properties │ └── launchSettings.json │ ├── Startup.cs │ ├── TopsyTurvyCakes.csproj │ └── wwwroot │ ├── bootstrap.css │ ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 │ └── site.css └── artifacts └── Login.cshtml /Ch02/02_01_End/TopsyTurvyCakes/Models/IRecipesService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | 4 | namespace TopsyTurvyCakes.Models 5 | { 6 | public interface IRecipesService 7 | { 8 | Task DeleteAsync(long id); 9 | Recipe Find(long id); 10 | Task FindAsync(long id); 11 | IQueryable GetAll(int? count = null, int? page = null); 12 | Task GetAllAsync(int? count = null, int? page = null); 13 | Task SaveAsync(Recipe recipe); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch02/02_01_End/TopsyTurvyCakes/Models/RecipesDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace TopsyTurvyCakes.Models 4 | { 5 | public class RecipesDbContext : DbContext 6 | { 7 | public DbSet Recipes { get; set; } 8 | 9 | public RecipesDbContext(DbContextOptions options) 10 | : base(options) 11 | { 12 | this.EnsureSeedData(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch02/02_01_End/TopsyTurvyCakes/Pages/.gitignore: -------------------------------------------------------------------------------- 1 | # Blank gitignore just to include an empty folder -------------------------------------------------------------------------------- /Ch02/02_01_End/TopsyTurvyCakes/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace TopsyTurvyCakes 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup() 23 | .Build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Ch02/02_01_End/TopsyTurvyCakes/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:50742/", 7 | "sslPort": 0 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | }, 18 | "TopsyTurvyCakes": { 19 | "commandName": "Project", 20 | "launchBrowser": true, 21 | "environmentVariables": { 22 | "ASPNETCORE_ENVIRONMENT": "Development" 23 | }, 24 | "applicationUrl": "http://localhost:50743/" 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Ch02/02_01_End/TopsyTurvyCakes/TopsyTurvyCakes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Ch02/02_01_End/TopsyTurvyCakes/wwwroot/.gitignore: -------------------------------------------------------------------------------- 1 | # Blank gitignore just to include an empty folder -------------------------------------------------------------------------------- /Ch02/02_02_Begin/TopsyTurvyCakes/Models/IRecipesService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | 4 | namespace TopsyTurvyCakes.Models 5 | { 6 | public interface IRecipesService 7 | { 8 | Task DeleteAsync(long id); 9 | Recipe Find(long id); 10 | Task FindAsync(long id); 11 | IQueryable GetAll(int? count = null, int? page = null); 12 | Task GetAllAsync(int? count = null, int? page = null); 13 | Task SaveAsync(Recipe recipe); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch02/02_02_Begin/TopsyTurvyCakes/Models/RecipesDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace TopsyTurvyCakes.Models 4 | { 5 | public class RecipesDbContext : DbContext 6 | { 7 | public DbSet Recipes { get; set; } 8 | 9 | public RecipesDbContext(DbContextOptions options) 10 | : base(options) 11 | { 12 | this.EnsureSeedData(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch02/02_02_Begin/TopsyTurvyCakes/Pages/.gitignore: -------------------------------------------------------------------------------- 1 | # Blank gitignore just to include an empty folder -------------------------------------------------------------------------------- /Ch02/02_02_Begin/TopsyTurvyCakes/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace TopsyTurvyCakes 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup() 23 | .Build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Ch02/02_02_Begin/TopsyTurvyCakes/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:50742/", 7 | "sslPort": 0 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | }, 18 | "TopsyTurvyCakes": { 19 | "commandName": "Project", 20 | "launchBrowser": true, 21 | "environmentVariables": { 22 | "ASPNETCORE_ENVIRONMENT": "Development" 23 | }, 24 | "applicationUrl": "http://localhost:50743/" 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Ch02/02_02_Begin/TopsyTurvyCakes/TopsyTurvyCakes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Ch02/02_02_Begin/TopsyTurvyCakes/wwwroot/.gitignore: -------------------------------------------------------------------------------- 1 | # Blank gitignore just to include an empty folder -------------------------------------------------------------------------------- /Ch02/02_02_End/TopsyTurvyCakes/Models/IRecipesService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | 4 | namespace TopsyTurvyCakes.Models 5 | { 6 | public interface IRecipesService 7 | { 8 | Task DeleteAsync(long id); 9 | Recipe Find(long id); 10 | Task FindAsync(long id); 11 | IQueryable GetAll(int? count = null, int? page = null); 12 | Task GetAllAsync(int? count = null, int? page = null); 13 | Task SaveAsync(Recipe recipe); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch02/02_02_End/TopsyTurvyCakes/Models/RecipesDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace TopsyTurvyCakes.Models 4 | { 5 | public class RecipesDbContext : DbContext 6 | { 7 | public DbSet Recipes { get; set; } 8 | 9 | public RecipesDbContext(DbContextOptions options) 10 | : base(options) 11 | { 12 | this.EnsureSeedData(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch02/02_02_End/TopsyTurvyCakes/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace TopsyTurvyCakes 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup() 23 | .Build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Ch02/02_02_End/TopsyTurvyCakes/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:50742/", 7 | "sslPort": 0 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | }, 18 | "TopsyTurvyCakes": { 19 | "commandName": "Project", 20 | "launchBrowser": true, 21 | "environmentVariables": { 22 | "ASPNETCORE_ENVIRONMENT": "Development" 23 | }, 24 | "applicationUrl": "http://localhost:50743/" 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Ch02/02_02_End/TopsyTurvyCakes/TopsyTurvyCakes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Ch02/02_02_End/TopsyTurvyCakes/wwwroot/.gitignore: -------------------------------------------------------------------------------- 1 | # Blank gitignore just to include an empty folder -------------------------------------------------------------------------------- /Ch02/02_03_Begin/TopsyTurvyCakes/Models/IRecipesService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | 4 | namespace TopsyTurvyCakes.Models 5 | { 6 | public interface IRecipesService 7 | { 8 | Task DeleteAsync(long id); 9 | Recipe Find(long id); 10 | Task FindAsync(long id); 11 | IQueryable GetAll(int? count = null, int? page = null); 12 | Task GetAllAsync(int? count = null, int? page = null); 13 | Task SaveAsync(Recipe recipe); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch02/02_03_Begin/TopsyTurvyCakes/Models/RecipesDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace TopsyTurvyCakes.Models 4 | { 5 | public class RecipesDbContext : DbContext 6 | { 7 | public DbSet Recipes { get; set; } 8 | 9 | public RecipesDbContext(DbContextOptions options) 10 | : base(options) 11 | { 12 | this.EnsureSeedData(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch02/02_03_Begin/TopsyTurvyCakes/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace TopsyTurvyCakes 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup() 23 | .Build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Ch02/02_03_Begin/TopsyTurvyCakes/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:50742/", 7 | "sslPort": 0 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | }, 18 | "TopsyTurvyCakes": { 19 | "commandName": "Project", 20 | "launchBrowser": true, 21 | "environmentVariables": { 22 | "ASPNETCORE_ENVIRONMENT": "Development" 23 | }, 24 | "applicationUrl": "http://localhost:50743/" 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Ch02/02_03_Begin/TopsyTurvyCakes/TopsyTurvyCakes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Ch02/02_03_Begin/TopsyTurvyCakes/wwwroot/.gitignore: -------------------------------------------------------------------------------- 1 | # Blank gitignore just to include an empty folder -------------------------------------------------------------------------------- /Ch02/02_03_End/TopsyTurvyCakes/Models/IRecipesService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | 4 | namespace TopsyTurvyCakes.Models 5 | { 6 | public interface IRecipesService 7 | { 8 | Task DeleteAsync(long id); 9 | Recipe Find(long id); 10 | Task FindAsync(long id); 11 | IQueryable GetAll(int? count = null, int? page = null); 12 | Task GetAllAsync(int? count = null, int? page = null); 13 | Task SaveAsync(Recipe recipe); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch02/02_03_End/TopsyTurvyCakes/Models/RecipesDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace TopsyTurvyCakes.Models 4 | { 5 | public class RecipesDbContext : DbContext 6 | { 7 | public DbSet Recipes { get; set; } 8 | 9 | public RecipesDbContext(DbContextOptions options) 10 | : base(options) 11 | { 12 | this.EnsureSeedData(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch02/02_03_End/TopsyTurvyCakes/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace TopsyTurvyCakes 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup() 23 | .Build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Ch02/02_03_End/TopsyTurvyCakes/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:50742/", 7 | "sslPort": 0 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | }, 18 | "TopsyTurvyCakes": { 19 | "commandName": "Project", 20 | "launchBrowser": true, 21 | "environmentVariables": { 22 | "ASPNETCORE_ENVIRONMENT": "Development" 23 | }, 24 | "applicationUrl": "http://localhost:50743/" 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Ch02/02_03_End/TopsyTurvyCakes/TopsyTurvyCakes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Ch02/02_03_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch02/02_03_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Ch02/02_03_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch02/02_03_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Ch02/02_03_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch02/02_03_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Ch02/02_03_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch02/02_03_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /Ch02/02_04_Begin/TopsyTurvyCakes/Models/IRecipesService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | 4 | namespace TopsyTurvyCakes.Models 5 | { 6 | public interface IRecipesService 7 | { 8 | Task DeleteAsync(long id); 9 | Recipe Find(long id); 10 | Task FindAsync(long id); 11 | IQueryable GetAll(int? count = null, int? page = null); 12 | Task GetAllAsync(int? count = null, int? page = null); 13 | Task SaveAsync(Recipe recipe); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch02/02_04_Begin/TopsyTurvyCakes/Models/RecipesDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace TopsyTurvyCakes.Models 4 | { 5 | public class RecipesDbContext : DbContext 6 | { 7 | public DbSet Recipes { get; set; } 8 | 9 | public RecipesDbContext(DbContextOptions options) 10 | : base(options) 11 | { 12 | this.EnsureSeedData(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch02/02_04_Begin/TopsyTurvyCakes/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace TopsyTurvyCakes 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup() 23 | .Build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Ch02/02_04_Begin/TopsyTurvyCakes/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:50742/", 7 | "sslPort": 0 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | }, 18 | "TopsyTurvyCakes": { 19 | "commandName": "Project", 20 | "launchBrowser": true, 21 | "environmentVariables": { 22 | "ASPNETCORE_ENVIRONMENT": "Development" 23 | }, 24 | "applicationUrl": "http://localhost:50743/" 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Ch02/02_04_Begin/TopsyTurvyCakes/TopsyTurvyCakes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Ch02/02_04_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch02/02_04_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Ch02/02_04_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch02/02_04_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Ch02/02_04_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch02/02_04_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Ch02/02_04_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch02/02_04_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /Ch02/02_04_End/TopsyTurvyCakes/Models/IRecipesService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | 4 | namespace TopsyTurvyCakes.Models 5 | { 6 | public interface IRecipesService 7 | { 8 | Task DeleteAsync(long id); 9 | Recipe Find(long id); 10 | Task FindAsync(long id); 11 | IQueryable GetAll(int? count = null, int? page = null); 12 | Task GetAllAsync(int? count = null, int? page = null); 13 | Task SaveAsync(Recipe recipe); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch02/02_04_End/TopsyTurvyCakes/Models/RecipesDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace TopsyTurvyCakes.Models 4 | { 5 | public class RecipesDbContext : DbContext 6 | { 7 | public DbSet Recipes { get; set; } 8 | 9 | public RecipesDbContext(DbContextOptions options) 10 | : base(options) 11 | { 12 | this.EnsureSeedData(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch02/02_04_End/TopsyTurvyCakes/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace TopsyTurvyCakes 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup() 23 | .Build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Ch02/02_04_End/TopsyTurvyCakes/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:50742/", 7 | "sslPort": 0 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | }, 18 | "TopsyTurvyCakes": { 19 | "commandName": "Project", 20 | "launchBrowser": true, 21 | "environmentVariables": { 22 | "ASPNETCORE_ENVIRONMENT": "Development" 23 | }, 24 | "applicationUrl": "http://localhost:50743/" 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Ch02/02_04_End/TopsyTurvyCakes/TopsyTurvyCakes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Ch02/02_04_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch02/02_04_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Ch02/02_04_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch02/02_04_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Ch02/02_04_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch02/02_04_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Ch02/02_04_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch02/02_04_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /Ch02/02_05_Begin/TopsyTurvyCakes/Models/IRecipesService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | 4 | namespace TopsyTurvyCakes.Models 5 | { 6 | public interface IRecipesService 7 | { 8 | Task DeleteAsync(long id); 9 | Recipe Find(long id); 10 | Task FindAsync(long id); 11 | IQueryable GetAll(int? count = null, int? page = null); 12 | Task GetAllAsync(int? count = null, int? page = null); 13 | Task SaveAsync(Recipe recipe); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch02/02_05_Begin/TopsyTurvyCakes/Models/RecipesDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace TopsyTurvyCakes.Models 4 | { 5 | public class RecipesDbContext : DbContext 6 | { 7 | public DbSet Recipes { get; set; } 8 | 9 | public RecipesDbContext(DbContextOptions options) 10 | : base(options) 11 | { 12 | this.EnsureSeedData(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch02/02_05_Begin/TopsyTurvyCakes/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace TopsyTurvyCakes 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup() 23 | .Build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Ch02/02_05_Begin/TopsyTurvyCakes/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:50742/", 7 | "sslPort": 0 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | }, 18 | "TopsyTurvyCakes": { 19 | "commandName": "Project", 20 | "launchBrowser": true, 21 | "environmentVariables": { 22 | "ASPNETCORE_ENVIRONMENT": "Development" 23 | }, 24 | "applicationUrl": "http://localhost:50743/" 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Ch02/02_05_Begin/TopsyTurvyCakes/TopsyTurvyCakes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Ch02/02_05_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch02/02_05_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Ch02/02_05_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch02/02_05_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Ch02/02_05_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch02/02_05_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Ch02/02_05_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch02/02_05_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /Ch02/02_05_End/TopsyTurvyCakes/Models/IRecipesService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | 4 | namespace TopsyTurvyCakes.Models 5 | { 6 | public interface IRecipesService 7 | { 8 | Task DeleteAsync(long id); 9 | Recipe Find(long id); 10 | Task FindAsync(long id); 11 | IQueryable GetAll(int? count = null, int? page = null); 12 | Task GetAllAsync(int? count = null, int? page = null); 13 | Task SaveAsync(Recipe recipe); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch02/02_05_End/TopsyTurvyCakes/Models/RecipesDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace TopsyTurvyCakes.Models 4 | { 5 | public class RecipesDbContext : DbContext 6 | { 7 | public DbSet Recipes { get; set; } 8 | 9 | public RecipesDbContext(DbContextOptions options) 10 | : base(options) 11 | { 12 | this.EnsureSeedData(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch02/02_05_End/TopsyTurvyCakes/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace TopsyTurvyCakes 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup() 23 | .Build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Ch02/02_05_End/TopsyTurvyCakes/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:50742/", 7 | "sslPort": 0 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | }, 18 | "TopsyTurvyCakes": { 19 | "commandName": "Project", 20 | "launchBrowser": true, 21 | "environmentVariables": { 22 | "ASPNETCORE_ENVIRONMENT": "Development" 23 | }, 24 | "applicationUrl": "http://localhost:50743/" 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Ch02/02_05_End/TopsyTurvyCakes/TopsyTurvyCakes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Ch02/02_05_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch02/02_05_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Ch02/02_05_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch02/02_05_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Ch02/02_05_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch02/02_05_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Ch02/02_05_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch02/02_05_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /Ch02/02_06_Begin/TopsyTurvyCakes/Models/IRecipesService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | 4 | namespace TopsyTurvyCakes.Models 5 | { 6 | public interface IRecipesService 7 | { 8 | Task DeleteAsync(long id); 9 | Recipe Find(long id); 10 | Task FindAsync(long id); 11 | IQueryable GetAll(int? count = null, int? page = null); 12 | Task GetAllAsync(int? count = null, int? page = null); 13 | Task SaveAsync(Recipe recipe); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch02/02_06_Begin/TopsyTurvyCakes/Models/RecipesDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace TopsyTurvyCakes.Models 4 | { 5 | public class RecipesDbContext : DbContext 6 | { 7 | public DbSet Recipes { get; set; } 8 | 9 | public RecipesDbContext(DbContextOptions options) 10 | : base(options) 11 | { 12 | this.EnsureSeedData(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch02/02_06_Begin/TopsyTurvyCakes/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace TopsyTurvyCakes 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup() 23 | .Build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Ch02/02_06_Begin/TopsyTurvyCakes/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:50742/", 7 | "sslPort": 0 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | }, 18 | "TopsyTurvyCakes": { 19 | "commandName": "Project", 20 | "launchBrowser": true, 21 | "environmentVariables": { 22 | "ASPNETCORE_ENVIRONMENT": "Development" 23 | }, 24 | "applicationUrl": "http://localhost:50743/" 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Ch02/02_06_Begin/TopsyTurvyCakes/TopsyTurvyCakes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Ch02/02_06_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch02/02_06_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Ch02/02_06_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch02/02_06_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Ch02/02_06_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch02/02_06_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Ch02/02_06_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch02/02_06_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /Ch02/02_06_End/TopsyTurvyCakes/Models/IRecipesService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | 4 | namespace TopsyTurvyCakes.Models 5 | { 6 | public interface IRecipesService 7 | { 8 | Task DeleteAsync(long id); 9 | Recipe Find(long id); 10 | Task FindAsync(long id); 11 | IQueryable GetAll(int? count = null, int? page = null); 12 | Task GetAllAsync(int? count = null, int? page = null); 13 | Task SaveAsync(Recipe recipe); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch02/02_06_End/TopsyTurvyCakes/Models/RecipesDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace TopsyTurvyCakes.Models 4 | { 5 | public class RecipesDbContext : DbContext 6 | { 7 | public DbSet Recipes { get; set; } 8 | 9 | public RecipesDbContext(DbContextOptions options) 10 | : base(options) 11 | { 12 | this.EnsureSeedData(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch02/02_06_End/TopsyTurvyCakes/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace TopsyTurvyCakes 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup() 23 | .Build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Ch02/02_06_End/TopsyTurvyCakes/TopsyTurvyCakes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Ch02/02_06_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch02/02_06_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Ch02/02_06_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch02/02_06_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Ch02/02_06_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch02/02_06_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Ch02/02_06_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch02/02_06_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /Ch02/artifacts/Models/IRecipesService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | 4 | namespace TopsyTurvyCakes.Models 5 | { 6 | public interface IRecipesService 7 | { 8 | Task DeleteAsync(long id); 9 | Recipe Find(long id); 10 | Task FindAsync(long id); 11 | IQueryable GetAll(int? count = null, int? page = null); 12 | Task GetAllAsync(int? count = null, int? page = null); 13 | Task SaveAsync(Recipe recipe); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch02/artifacts/Models/RecipesDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace TopsyTurvyCakes.Models 4 | { 5 | public class RecipesDbContext : DbContext 6 | { 7 | public DbSet Recipes { get; set; } 8 | 9 | public RecipesDbContext(DbContextOptions options) 10 | : base(options) 11 | { 12 | this.EnsureSeedData(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch02/artifacts/wwwroot/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch02/artifacts/wwwroot/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Ch02/artifacts/wwwroot/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch02/artifacts/wwwroot/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Ch02/artifacts/wwwroot/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch02/artifacts/wwwroot/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Ch02/artifacts/wwwroot/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch02/artifacts/wwwroot/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /Ch03/03_01_Begin/TopsyTurvyCakes/Models/IRecipesService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | 4 | namespace TopsyTurvyCakes.Models 5 | { 6 | public interface IRecipesService 7 | { 8 | Task DeleteAsync(long id); 9 | Recipe Find(long id); 10 | Task FindAsync(long id); 11 | IQueryable GetAll(int? count = null, int? page = null); 12 | Task GetAllAsync(int? count = null, int? page = null); 13 | Task SaveAsync(Recipe recipe); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch03/03_01_Begin/TopsyTurvyCakes/Models/RecipesDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace TopsyTurvyCakes.Models 4 | { 5 | public class RecipesDbContext : DbContext 6 | { 7 | public DbSet Recipes { get; set; } 8 | 9 | public RecipesDbContext(DbContextOptions options) 10 | : base(options) 11 | { 12 | this.EnsureSeedData(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch03/03_01_Begin/TopsyTurvyCakes/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace TopsyTurvyCakes 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup() 23 | .Build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Ch03/03_01_Begin/TopsyTurvyCakes/TopsyTurvyCakes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Ch03/03_01_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch03/03_01_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Ch03/03_01_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch03/03_01_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Ch03/03_01_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch03/03_01_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Ch03/03_01_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch03/03_01_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /Ch03/03_01_End/TopsyTurvyCakes/Models/IRecipesService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | 4 | namespace TopsyTurvyCakes.Models 5 | { 6 | public interface IRecipesService 7 | { 8 | Task DeleteAsync(long id); 9 | Recipe Find(long id); 10 | Task FindAsync(long id); 11 | IQueryable GetAll(int? count = null, int? page = null); 12 | Task GetAllAsync(int? count = null, int? page = null); 13 | Task SaveAsync(Recipe recipe); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch03/03_01_End/TopsyTurvyCakes/Models/RecipesDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace TopsyTurvyCakes.Models 4 | { 5 | public class RecipesDbContext : DbContext 6 | { 7 | public DbSet Recipes { get; set; } 8 | 9 | public RecipesDbContext(DbContextOptions options) 10 | : base(options) 11 | { 12 | this.EnsureSeedData(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch03/03_01_End/TopsyTurvyCakes/Pages/Index.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 3 | @using TopsyTurvyCakes.Models 4 | @{ 5 | Layout = "_Layout"; 6 | var recipesService = new RecipesService(); 7 | var recipes = await recipesService.GetAllAsync(); 8 | } 9 | 10 |
11 | 12 | @foreach (var recipe in recipes) 13 | { 14 |
15 | 16 |

@recipe.Name

17 |

@recipe.Description

18 |
19 | } 20 | 21 |
22 | -------------------------------------------------------------------------------- /Ch03/03_01_End/TopsyTurvyCakes/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace TopsyTurvyCakes 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup() 23 | .Build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Ch03/03_01_End/TopsyTurvyCakes/TopsyTurvyCakes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Ch03/03_01_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch03/03_01_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Ch03/03_01_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch03/03_01_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Ch03/03_01_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch03/03_01_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Ch03/03_01_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch03/03_01_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /Ch03/03_02_Begin/TopsyTurvyCakes/Models/IRecipesService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | 4 | namespace TopsyTurvyCakes.Models 5 | { 6 | public interface IRecipesService 7 | { 8 | Task DeleteAsync(long id); 9 | Recipe Find(long id); 10 | Task FindAsync(long id); 11 | IQueryable GetAll(int? count = null, int? page = null); 12 | Task GetAllAsync(int? count = null, int? page = null); 13 | Task SaveAsync(Recipe recipe); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch03/03_02_Begin/TopsyTurvyCakes/Models/RecipesDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace TopsyTurvyCakes.Models 4 | { 5 | public class RecipesDbContext : DbContext 6 | { 7 | public DbSet Recipes { get; set; } 8 | 9 | public RecipesDbContext(DbContextOptions options) 10 | : base(options) 11 | { 12 | this.EnsureSeedData(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch03/03_02_Begin/TopsyTurvyCakes/Pages/Index.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 3 | @using TopsyTurvyCakes.Models 4 | @{ 5 | Layout = "_Layout"; 6 | var recipesService = new RecipesService(); 7 | var recipes = await recipesService.GetAllAsync(); 8 | } 9 | 10 |
11 | 12 | @foreach (var recipe in recipes) 13 | { 14 |
15 | 16 |

@recipe.Name

17 |

@recipe.Description

18 |
19 | } 20 | 21 |
22 | -------------------------------------------------------------------------------- /Ch03/03_02_Begin/TopsyTurvyCakes/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace TopsyTurvyCakes 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup() 23 | .Build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Ch03/03_02_Begin/TopsyTurvyCakes/TopsyTurvyCakes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Ch03/03_02_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch03/03_02_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Ch03/03_02_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch03/03_02_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Ch03/03_02_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch03/03_02_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Ch03/03_02_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch03/03_02_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /Ch03/03_02_End/TopsyTurvyCakes/Models/IRecipesService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | 4 | namespace TopsyTurvyCakes.Models 5 | { 6 | public interface IRecipesService 7 | { 8 | Task DeleteAsync(long id); 9 | Recipe Find(long id); 10 | Task FindAsync(long id); 11 | IQueryable GetAll(int? count = null, int? page = null); 12 | Task GetAllAsync(int? count = null, int? page = null); 13 | Task SaveAsync(Recipe recipe); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch03/03_02_End/TopsyTurvyCakes/Models/RecipesDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace TopsyTurvyCakes.Models 4 | { 5 | public class RecipesDbContext : DbContext 6 | { 7 | public DbSet Recipes { get; set; } 8 | 9 | public RecipesDbContext(DbContextOptions options) 10 | : base(options) 11 | { 12 | this.EnsureSeedData(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch03/03_02_End/TopsyTurvyCakes/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace TopsyTurvyCakes 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup() 23 | .Build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Ch03/03_02_End/TopsyTurvyCakes/TopsyTurvyCakes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Ch03/03_02_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch03/03_02_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Ch03/03_02_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch03/03_02_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Ch03/03_02_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch03/03_02_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Ch03/03_02_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch03/03_02_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /Ch03/03_03_Begin/TopsyTurvyCakes/Models/IRecipesService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | 4 | namespace TopsyTurvyCakes.Models 5 | { 6 | public interface IRecipesService 7 | { 8 | Task DeleteAsync(long id); 9 | Recipe Find(long id); 10 | Task FindAsync(long id); 11 | IQueryable GetAll(int? count = null, int? page = null); 12 | Task GetAllAsync(int? count = null, int? page = null); 13 | Task SaveAsync(Recipe recipe); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch03/03_03_Begin/TopsyTurvyCakes/Models/RecipesDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace TopsyTurvyCakes.Models 4 | { 5 | public class RecipesDbContext : DbContext 6 | { 7 | public DbSet Recipes { get; set; } 8 | 9 | public RecipesDbContext(DbContextOptions options) 10 | : base(options) 11 | { 12 | this.EnsureSeedData(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch03/03_03_Begin/TopsyTurvyCakes/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace TopsyTurvyCakes 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup() 23 | .Build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Ch03/03_03_Begin/TopsyTurvyCakes/TopsyTurvyCakes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Ch03/03_03_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch03/03_03_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Ch03/03_03_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch03/03_03_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Ch03/03_03_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch03/03_03_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Ch03/03_03_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch03/03_03_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /Ch03/03_03_End/TopsyTurvyCakes/Models/IRecipesService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | 4 | namespace TopsyTurvyCakes.Models 5 | { 6 | public interface IRecipesService 7 | { 8 | Task DeleteAsync(long id); 9 | Recipe Find(long id); 10 | Task FindAsync(long id); 11 | IQueryable GetAll(int? count = null, int? page = null); 12 | Task GetAllAsync(int? count = null, int? page = null); 13 | Task SaveAsync(Recipe recipe); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch03/03_03_End/TopsyTurvyCakes/Models/RecipesDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace TopsyTurvyCakes.Models 4 | { 5 | public class RecipesDbContext : DbContext 6 | { 7 | public DbSet Recipes { get; set; } 8 | 9 | public RecipesDbContext(DbContextOptions options) 10 | : base(options) 11 | { 12 | this.EnsureSeedData(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch03/03_03_End/TopsyTurvyCakes/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace TopsyTurvyCakes 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup() 23 | .Build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Ch03/03_03_End/TopsyTurvyCakes/TopsyTurvyCakes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Ch03/03_03_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch03/03_03_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Ch03/03_03_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch03/03_03_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Ch03/03_03_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch03/03_03_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Ch03/03_03_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch03/03_03_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /Ch03/03_04_Begin/TopsyTurvyCakes/Models/IRecipesService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | 4 | namespace TopsyTurvyCakes.Models 5 | { 6 | public interface IRecipesService 7 | { 8 | Task DeleteAsync(long id); 9 | Recipe Find(long id); 10 | Task FindAsync(long id); 11 | IQueryable GetAll(int? count = null, int? page = null); 12 | Task GetAllAsync(int? count = null, int? page = null); 13 | Task SaveAsync(Recipe recipe); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch03/03_04_Begin/TopsyTurvyCakes/Models/RecipesDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace TopsyTurvyCakes.Models 4 | { 5 | public class RecipesDbContext : DbContext 6 | { 7 | public DbSet Recipes { get; set; } 8 | 9 | public RecipesDbContext(DbContextOptions options) 10 | : base(options) 11 | { 12 | this.EnsureSeedData(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch03/03_04_Begin/TopsyTurvyCakes/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace TopsyTurvyCakes 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup() 23 | .Build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Ch03/03_04_Begin/TopsyTurvyCakes/TopsyTurvyCakes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Ch03/03_04_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch03/03_04_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Ch03/03_04_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch03/03_04_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Ch03/03_04_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch03/03_04_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Ch03/03_04_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch03/03_04_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /Ch03/03_04_End/TopsyTurvyCakes/Models/IRecipesService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | 4 | namespace TopsyTurvyCakes.Models 5 | { 6 | public interface IRecipesService 7 | { 8 | Task DeleteAsync(long id); 9 | Recipe Find(long id); 10 | Task FindAsync(long id); 11 | IQueryable GetAll(int? count = null, int? page = null); 12 | Task GetAllAsync(int? count = null, int? page = null); 13 | Task SaveAsync(Recipe recipe); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch03/03_04_End/TopsyTurvyCakes/Models/RecipesDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace TopsyTurvyCakes.Models 4 | { 5 | public class RecipesDbContext : DbContext 6 | { 7 | public DbSet Recipes { get; set; } 8 | 9 | public RecipesDbContext(DbContextOptions options) 10 | : base(options) 11 | { 12 | this.EnsureSeedData(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch03/03_04_End/TopsyTurvyCakes/Pages/Index.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @{ 3 | var recipesService = new RecipesService(); 4 | var recipes = await recipesService.GetAllAsync(); 5 | } 6 | 7 | @section Title { 8 |

My Favorite Recipes

9 | Add Recipe 10 | } 11 | 12 | 13 |
14 | 15 | @foreach (var recipe in recipes) 16 | { 17 |
18 | 19 |

@recipe.Name

20 |

@recipe.Description

21 |
22 | } 23 | 24 |
25 | -------------------------------------------------------------------------------- /Ch03/03_04_End/TopsyTurvyCakes/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using TopsyTurvyCakes.Models 2 | @namespace TopsyTurvyCakes.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | -------------------------------------------------------------------------------- /Ch03/03_04_End/TopsyTurvyCakes/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /Ch03/03_04_End/TopsyTurvyCakes/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace TopsyTurvyCakes 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup() 23 | .Build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Ch03/03_04_End/TopsyTurvyCakes/TopsyTurvyCakes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Ch03/03_04_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch03/03_04_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Ch03/03_04_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch03/03_04_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Ch03/03_04_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch03/03_04_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Ch03/03_04_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch03/03_04_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /Ch04/04_02_Begin/TopsyTurvyCakes/Models/IRecipesService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | 4 | namespace TopsyTurvyCakes.Models 5 | { 6 | public interface IRecipesService 7 | { 8 | Task DeleteAsync(long id); 9 | Recipe Find(long id); 10 | Task FindAsync(long id); 11 | IQueryable GetAll(int? count = null, int? page = null); 12 | Task GetAllAsync(int? count = null, int? page = null); 13 | Task SaveAsync(Recipe recipe); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch04/04_02_Begin/TopsyTurvyCakes/Models/RecipesDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace TopsyTurvyCakes.Models 4 | { 5 | public class RecipesDbContext : DbContext 6 | { 7 | public DbSet Recipes { get; set; } 8 | 9 | public RecipesDbContext(DbContextOptions options) 10 | : base(options) 11 | { 12 | this.EnsureSeedData(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch04/04_02_Begin/TopsyTurvyCakes/Pages/Index.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @{ 3 | var recipesService = new RecipesService(); 4 | var recipes = await recipesService.GetAllAsync(); 5 | } 6 | 7 | @section Title { 8 |

My Favorite Recipes

9 | Add Recipe 10 | } 11 | 12 | 13 |
14 | 15 | @foreach (var recipe in recipes) 16 | { 17 |
18 | 19 |

@recipe.Name

20 |

@recipe.Description

21 |
22 | } 23 | 24 |
25 | -------------------------------------------------------------------------------- /Ch04/04_02_Begin/TopsyTurvyCakes/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using TopsyTurvyCakes.Models 2 | @namespace TopsyTurvyCakes.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | -------------------------------------------------------------------------------- /Ch04/04_02_Begin/TopsyTurvyCakes/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /Ch04/04_02_Begin/TopsyTurvyCakes/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace TopsyTurvyCakes 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup() 23 | .Build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Ch04/04_02_Begin/TopsyTurvyCakes/TopsyTurvyCakes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Ch04/04_02_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch04/04_02_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Ch04/04_02_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch04/04_02_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Ch04/04_02_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch04/04_02_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Ch04/04_02_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch04/04_02_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /Ch04/04_02_End/TopsyTurvyCakes/Models/IRecipesService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | 4 | namespace TopsyTurvyCakes.Models 5 | { 6 | public interface IRecipesService 7 | { 8 | Task DeleteAsync(long id); 9 | Recipe Find(long id); 10 | Task FindAsync(long id); 11 | IQueryable GetAll(int? count = null, int? page = null); 12 | Task GetAllAsync(int? count = null, int? page = null); 13 | Task SaveAsync(Recipe recipe); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch04/04_02_End/TopsyTurvyCakes/Models/RecipesDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace TopsyTurvyCakes.Models 4 | { 5 | public class RecipesDbContext : DbContext 6 | { 7 | public DbSet Recipes { get; set; } 8 | 9 | public RecipesDbContext(DbContextOptions options) 10 | : base(options) 11 | { 12 | this.EnsureSeedData(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch04/04_02_End/TopsyTurvyCakes/Pages/Admin/AddEditRecipe.cshtml: -------------------------------------------------------------------------------- 1 | @page "{id?}" 2 | @model AddEditRecipeModel 3 | @{ 4 | ViewData["Title"] = Model.IsNewRecipe ? "New Recipe" : "Edit Recipe"; 5 | } 6 | 7 | Id: @Model.Id -------------------------------------------------------------------------------- /Ch04/04_02_End/TopsyTurvyCakes/Pages/Admin/AddEditRecipe.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | using TopsyTurvyCakes.Models; 8 | 9 | namespace TopsyTurvyCakes.Pages.Admin 10 | { 11 | public class AddEditRecipeModel : PageModel 12 | { 13 | [FromRoute] 14 | public long? Id { get; set; } 15 | 16 | public bool IsNewRecipe 17 | { 18 | get { return Id == null; } 19 | } 20 | 21 | public Recipe Recipe { get; set; } 22 | 23 | public void OnGet() 24 | { 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /Ch04/04_02_End/TopsyTurvyCakes/Pages/Index.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @{ 3 | var recipesService = new RecipesService(); 4 | var recipes = await recipesService.GetAllAsync(); 5 | } 6 | 7 | @section Title { 8 |

My Favorite Recipes

9 | Add Recipe 10 | } 11 | 12 | 13 |
14 | 15 | @foreach (var recipe in recipes) 16 | { 17 |
18 | 19 |

@recipe.Name

20 |

@recipe.Description

21 |
22 | } 23 | 24 |
25 | -------------------------------------------------------------------------------- /Ch04/04_02_End/TopsyTurvyCakes/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using TopsyTurvyCakes.Models 2 | @namespace TopsyTurvyCakes.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | -------------------------------------------------------------------------------- /Ch04/04_02_End/TopsyTurvyCakes/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /Ch04/04_02_End/TopsyTurvyCakes/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace TopsyTurvyCakes 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup() 23 | .Build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Ch04/04_02_End/TopsyTurvyCakes/TopsyTurvyCakes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Ch04/04_02_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch04/04_02_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Ch04/04_02_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch04/04_02_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Ch04/04_02_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch04/04_02_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Ch04/04_02_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch04/04_02_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /Ch04/04_03_Begin/TopsyTurvyCakes/Models/IRecipesService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | 4 | namespace TopsyTurvyCakes.Models 5 | { 6 | public interface IRecipesService 7 | { 8 | Task DeleteAsync(long id); 9 | Recipe Find(long id); 10 | Task FindAsync(long id); 11 | IQueryable GetAll(int? count = null, int? page = null); 12 | Task GetAllAsync(int? count = null, int? page = null); 13 | Task SaveAsync(Recipe recipe); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch04/04_03_Begin/TopsyTurvyCakes/Models/RecipesDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace TopsyTurvyCakes.Models 4 | { 5 | public class RecipesDbContext : DbContext 6 | { 7 | public DbSet Recipes { get; set; } 8 | 9 | public RecipesDbContext(DbContextOptions options) 10 | : base(options) 11 | { 12 | this.EnsureSeedData(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch04/04_03_Begin/TopsyTurvyCakes/Pages/Admin/AddEditRecipe.cshtml: -------------------------------------------------------------------------------- 1 | @page "{id?}" 2 | @model AddEditRecipeModel 3 | @{ 4 | ViewData["Title"] = Model.IsNewRecipe ? "New Recipe" : "Edit Recipe"; 5 | } 6 | 7 | Id: @Model.Id -------------------------------------------------------------------------------- /Ch04/04_03_Begin/TopsyTurvyCakes/Pages/Admin/AddEditRecipe.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | using TopsyTurvyCakes.Models; 8 | 9 | namespace TopsyTurvyCakes.Pages.Admin 10 | { 11 | public class AddEditRecipeModel : PageModel 12 | { 13 | [FromRoute] 14 | public long? Id { get; set; } 15 | 16 | public bool IsNewRecipe 17 | { 18 | get { return Id == null; } 19 | } 20 | 21 | public Recipe Recipe { get; set; } 22 | 23 | public void OnGet() 24 | { 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /Ch04/04_03_Begin/TopsyTurvyCakes/Pages/Index.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @{ 3 | var recipesService = new RecipesService(); 4 | var recipes = await recipesService.GetAllAsync(); 5 | } 6 | 7 | @section Title { 8 |

My Favorite Recipes

9 | Add Recipe 10 | } 11 | 12 | 13 |
14 | 15 | @foreach (var recipe in recipes) 16 | { 17 |
18 | 19 |

@recipe.Name

20 |

@recipe.Description

21 |
22 | } 23 | 24 |
25 | -------------------------------------------------------------------------------- /Ch04/04_03_Begin/TopsyTurvyCakes/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using TopsyTurvyCakes.Models 2 | @namespace TopsyTurvyCakes.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | -------------------------------------------------------------------------------- /Ch04/04_03_Begin/TopsyTurvyCakes/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /Ch04/04_03_Begin/TopsyTurvyCakes/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace TopsyTurvyCakes 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup() 23 | .Build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Ch04/04_03_Begin/TopsyTurvyCakes/TopsyTurvyCakes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Ch04/04_03_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch04/04_03_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Ch04/04_03_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch04/04_03_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Ch04/04_03_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch04/04_03_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Ch04/04_03_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch04/04_03_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /Ch04/04_03_End/TopsyTurvyCakes/Models/IRecipesService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | 4 | namespace TopsyTurvyCakes.Models 5 | { 6 | public interface IRecipesService 7 | { 8 | Task DeleteAsync(long id); 9 | Recipe Find(long id); 10 | Task FindAsync(long id); 11 | IQueryable GetAll(int? count = null, int? page = null); 12 | Task GetAllAsync(int? count = null, int? page = null); 13 | Task SaveAsync(Recipe recipe); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch04/04_03_End/TopsyTurvyCakes/Models/RecipesDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace TopsyTurvyCakes.Models 4 | { 5 | public class RecipesDbContext : DbContext 6 | { 7 | public DbSet Recipes { get; set; } 8 | 9 | public RecipesDbContext(DbContextOptions options) 10 | : base(options) 11 | { 12 | this.EnsureSeedData(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch04/04_03_End/TopsyTurvyCakes/Pages/Admin/AddEditRecipe.cshtml: -------------------------------------------------------------------------------- 1 | @page "{id?}" 2 | @model AddEditRecipeModel 3 | @{ 4 | ViewData["Title"] = Model.IsNewRecipe ? "New Recipe" : "Edit Recipe"; 5 | } 6 | 7 | Id: @Model.Id -------------------------------------------------------------------------------- /Ch04/04_03_End/TopsyTurvyCakes/Pages/Admin/AddEditRecipe.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | using TopsyTurvyCakes.Models; 8 | 9 | namespace TopsyTurvyCakes.Pages.Admin 10 | { 11 | public class AddEditRecipeModel : PageModel 12 | { 13 | [FromRoute] 14 | public long? Id { get; set; } 15 | 16 | public bool IsNewRecipe 17 | { 18 | get { return Id == null; } 19 | } 20 | 21 | public Recipe Recipe { get; set; } 22 | 23 | public void OnGet() 24 | { 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /Ch04/04_03_End/TopsyTurvyCakes/Pages/Index.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @{ 3 | var recipes = await RecipesService.GetAllAsync(); 4 | } 5 | 6 | @section Title { 7 |

My Favorite Recipes

8 | Add Recipe 9 | } 10 | 11 | 12 |
13 | 14 | @foreach (var recipe in recipes) 15 | { 16 |
17 | 18 |

@recipe.Name

19 |

@recipe.Description

20 |
21 | } 22 | 23 |
24 | -------------------------------------------------------------------------------- /Ch04/04_03_End/TopsyTurvyCakes/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using TopsyTurvyCakes.Models 2 | @namespace TopsyTurvyCakes.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | @inject IRecipesService RecipesService 5 | -------------------------------------------------------------------------------- /Ch04/04_03_End/TopsyTurvyCakes/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /Ch04/04_03_End/TopsyTurvyCakes/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace TopsyTurvyCakes 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup() 23 | .Build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Ch04/04_03_End/TopsyTurvyCakes/TopsyTurvyCakes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Ch04/04_03_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch04/04_03_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Ch04/04_03_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch04/04_03_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Ch04/04_03_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch04/04_03_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Ch04/04_03_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch04/04_03_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /Ch05/05_01_Begin/TopsyTurvyCakes/Models/IRecipesService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | 4 | namespace TopsyTurvyCakes.Models 5 | { 6 | public interface IRecipesService 7 | { 8 | Task DeleteAsync(long id); 9 | Recipe Find(long id); 10 | Task FindAsync(long id); 11 | IQueryable GetAll(int? count = null, int? page = null); 12 | Task GetAllAsync(int? count = null, int? page = null); 13 | Task SaveAsync(Recipe recipe); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch05/05_01_Begin/TopsyTurvyCakes/Models/RecipesDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace TopsyTurvyCakes.Models 4 | { 5 | public class RecipesDbContext : DbContext 6 | { 7 | public DbSet Recipes { get; set; } 8 | 9 | public RecipesDbContext(DbContextOptions options) 10 | : base(options) 11 | { 12 | this.EnsureSeedData(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch05/05_01_Begin/TopsyTurvyCakes/Pages/Admin/AddEditRecipe.cshtml: -------------------------------------------------------------------------------- 1 | @page "{id?}" 2 | @model AddEditRecipeModel 3 | @{ 4 | ViewData["Title"] = Model.IsNewRecipe ? "New Recipe" : "Edit Recipe"; 5 | } 6 | 7 | Id: @Model.Id -------------------------------------------------------------------------------- /Ch05/05_01_Begin/TopsyTurvyCakes/Pages/Admin/AddEditRecipe.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | using TopsyTurvyCakes.Models; 8 | 9 | namespace TopsyTurvyCakes.Pages.Admin 10 | { 11 | public class AddEditRecipeModel : PageModel 12 | { 13 | [FromRoute] 14 | public long? Id { get; set; } 15 | 16 | public bool IsNewRecipe 17 | { 18 | get { return Id == null; } 19 | } 20 | 21 | public Recipe Recipe { get; set; } 22 | 23 | public void OnGet() 24 | { 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /Ch05/05_01_Begin/TopsyTurvyCakes/Pages/Index.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @{ 3 | var recipes = await RecipesService.GetAllAsync(); 4 | } 5 | 6 | @section Title { 7 |

My Favorite Recipes

8 | Add Recipe 9 | } 10 | 11 | 12 |
13 | 14 | @foreach (var recipe in recipes) 15 | { 16 |
17 | 18 |

@recipe.Name

19 |

@recipe.Description

20 |
21 | } 22 | 23 |
24 | -------------------------------------------------------------------------------- /Ch05/05_01_Begin/TopsyTurvyCakes/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using TopsyTurvyCakes.Models 2 | @namespace TopsyTurvyCakes.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | @inject IRecipesService RecipesService 5 | -------------------------------------------------------------------------------- /Ch05/05_01_Begin/TopsyTurvyCakes/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /Ch05/05_01_Begin/TopsyTurvyCakes/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace TopsyTurvyCakes 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup() 23 | .Build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Ch05/05_01_Begin/TopsyTurvyCakes/TopsyTurvyCakes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Ch05/05_01_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch05/05_01_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Ch05/05_01_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch05/05_01_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Ch05/05_01_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch05/05_01_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Ch05/05_01_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch05/05_01_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /Ch05/05_01_End/TopsyTurvyCakes/Models/IRecipesService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | 4 | namespace TopsyTurvyCakes.Models 5 | { 6 | public interface IRecipesService 7 | { 8 | Task DeleteAsync(long id); 9 | Recipe Find(long id); 10 | Task FindAsync(long id); 11 | IQueryable GetAll(int? count = null, int? page = null); 12 | Task GetAllAsync(int? count = null, int? page = null); 13 | Task SaveAsync(Recipe recipe); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch05/05_01_End/TopsyTurvyCakes/Models/RecipesDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace TopsyTurvyCakes.Models 4 | { 5 | public class RecipesDbContext : DbContext 6 | { 7 | public DbSet Recipes { get; set; } 8 | 9 | public RecipesDbContext(DbContextOptions options) 10 | : base(options) 11 | { 12 | this.EnsureSeedData(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch05/05_01_End/TopsyTurvyCakes/Pages/Admin/AddEditRecipe.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | using TopsyTurvyCakes.Models; 8 | 9 | namespace TopsyTurvyCakes.Pages.Admin 10 | { 11 | public class AddEditRecipeModel : PageModel 12 | { 13 | [FromRoute] 14 | public long? Id { get; set; } 15 | 16 | public bool IsNewRecipe 17 | { 18 | get { return Id == null; } 19 | } 20 | 21 | public Recipe Recipe { get; set; } 22 | 23 | public void OnGet() 24 | { 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /Ch05/05_01_End/TopsyTurvyCakes/Pages/Index.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @{ 3 | var recipes = await RecipesService.GetAllAsync(); 4 | } 5 | 6 | @section Title { 7 |

My Favorite Recipes

8 | Add Recipe 9 | } 10 | 11 | 12 |
13 | 14 | @foreach (var recipe in recipes) 15 | { 16 |
17 | 18 |

@recipe.Name

19 |

@recipe.Description

20 |
21 | } 22 | 23 |
24 | -------------------------------------------------------------------------------- /Ch05/05_01_End/TopsyTurvyCakes/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using TopsyTurvyCakes.Models 2 | @namespace TopsyTurvyCakes.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | @inject IRecipesService RecipesService 5 | -------------------------------------------------------------------------------- /Ch05/05_01_End/TopsyTurvyCakes/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /Ch05/05_01_End/TopsyTurvyCakes/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace TopsyTurvyCakes 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup() 23 | .Build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Ch05/05_01_End/TopsyTurvyCakes/TopsyTurvyCakes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Ch05/05_01_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch05/05_01_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Ch05/05_01_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch05/05_01_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Ch05/05_01_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch05/05_01_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Ch05/05_01_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch05/05_01_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /Ch05/05_02_Begin/TopsyTurvyCakes/Models/IRecipesService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | 4 | namespace TopsyTurvyCakes.Models 5 | { 6 | public interface IRecipesService 7 | { 8 | Task DeleteAsync(long id); 9 | Recipe Find(long id); 10 | Task FindAsync(long id); 11 | IQueryable GetAll(int? count = null, int? page = null); 12 | Task GetAllAsync(int? count = null, int? page = null); 13 | Task SaveAsync(Recipe recipe); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch05/05_02_Begin/TopsyTurvyCakes/Models/RecipesDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace TopsyTurvyCakes.Models 4 | { 5 | public class RecipesDbContext : DbContext 6 | { 7 | public DbSet Recipes { get; set; } 8 | 9 | public RecipesDbContext(DbContextOptions options) 10 | : base(options) 11 | { 12 | this.EnsureSeedData(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch05/05_02_Begin/TopsyTurvyCakes/Pages/Admin/AddEditRecipe.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | using TopsyTurvyCakes.Models; 8 | 9 | namespace TopsyTurvyCakes.Pages.Admin 10 | { 11 | public class AddEditRecipeModel : PageModel 12 | { 13 | [FromRoute] 14 | public long? Id { get; set; } 15 | 16 | public bool IsNewRecipe 17 | { 18 | get { return Id == null; } 19 | } 20 | 21 | public Recipe Recipe { get; set; } 22 | 23 | public void OnGet() 24 | { 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /Ch05/05_02_Begin/TopsyTurvyCakes/Pages/Index.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @{ 3 | var recipes = await RecipesService.GetAllAsync(); 4 | } 5 | 6 | @section Title { 7 |

My Favorite Recipes

8 | Add Recipe 9 | } 10 | 11 | 12 |
13 | 14 | @foreach (var recipe in recipes) 15 | { 16 |
17 | 18 |

@recipe.Name

19 |

@recipe.Description

20 |
21 | } 22 | 23 |
24 | -------------------------------------------------------------------------------- /Ch05/05_02_Begin/TopsyTurvyCakes/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using TopsyTurvyCakes.Models 2 | @namespace TopsyTurvyCakes.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | @inject IRecipesService RecipesService 5 | -------------------------------------------------------------------------------- /Ch05/05_02_Begin/TopsyTurvyCakes/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /Ch05/05_02_Begin/TopsyTurvyCakes/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace TopsyTurvyCakes 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup() 23 | .Build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Ch05/05_02_Begin/TopsyTurvyCakes/TopsyTurvyCakes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Ch05/05_02_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch05/05_02_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Ch05/05_02_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch05/05_02_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Ch05/05_02_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch05/05_02_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Ch05/05_02_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch05/05_02_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /Ch05/05_02_End/TopsyTurvyCakes/Models/IRecipesService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | 4 | namespace TopsyTurvyCakes.Models 5 | { 6 | public interface IRecipesService 7 | { 8 | Task DeleteAsync(long id); 9 | Recipe Find(long id); 10 | Task FindAsync(long id); 11 | IQueryable GetAll(int? count = null, int? page = null); 12 | Task GetAllAsync(int? count = null, int? page = null); 13 | Task SaveAsync(Recipe recipe); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch05/05_02_End/TopsyTurvyCakes/Models/RecipesDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace TopsyTurvyCakes.Models 4 | { 5 | public class RecipesDbContext : DbContext 6 | { 7 | public DbSet Recipes { get; set; } 8 | 9 | public RecipesDbContext(DbContextOptions options) 10 | : base(options) 11 | { 12 | this.EnsureSeedData(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch05/05_02_End/TopsyTurvyCakes/Pages/Index.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @{ 3 | var recipes = await RecipesService.GetAllAsync(); 4 | } 5 | 6 | @section Title { 7 |

My Favorite Recipes

8 | Add Recipe 9 | } 10 | 11 | 12 |
13 | 14 | @foreach (var recipe in recipes) 15 | { 16 |
17 | 18 |

@recipe.Name

19 |

@recipe.Description

20 |
21 | } 22 | 23 |
24 | -------------------------------------------------------------------------------- /Ch05/05_02_End/TopsyTurvyCakes/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using TopsyTurvyCakes.Models 2 | @namespace TopsyTurvyCakes.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | @inject IRecipesService RecipesService 5 | -------------------------------------------------------------------------------- /Ch05/05_02_End/TopsyTurvyCakes/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /Ch05/05_02_End/TopsyTurvyCakes/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace TopsyTurvyCakes 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup() 23 | .Build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Ch05/05_02_End/TopsyTurvyCakes/TopsyTurvyCakes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Ch05/05_02_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch05/05_02_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Ch05/05_02_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch05/05_02_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Ch05/05_02_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch05/05_02_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Ch05/05_02_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch05/05_02_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /Ch05/05_03_Begin/TopsyTurvyCakes/Models/IRecipesService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | 4 | namespace TopsyTurvyCakes.Models 5 | { 6 | public interface IRecipesService 7 | { 8 | Task DeleteAsync(long id); 9 | Recipe Find(long id); 10 | Task FindAsync(long id); 11 | IQueryable GetAll(int? count = null, int? page = null); 12 | Task GetAllAsync(int? count = null, int? page = null); 13 | Task SaveAsync(Recipe recipe); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch05/05_03_Begin/TopsyTurvyCakes/Models/RecipesDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace TopsyTurvyCakes.Models 4 | { 5 | public class RecipesDbContext : DbContext 6 | { 7 | public DbSet Recipes { get; set; } 8 | 9 | public RecipesDbContext(DbContextOptions options) 10 | : base(options) 11 | { 12 | this.EnsureSeedData(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch05/05_03_Begin/TopsyTurvyCakes/Pages/Index.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @{ 3 | var recipes = await RecipesService.GetAllAsync(); 4 | } 5 | 6 | @section Title { 7 |

My Favorite Recipes

8 | Add Recipe 9 | } 10 | 11 | 12 |
13 | 14 | @foreach (var recipe in recipes) 15 | { 16 |
17 | 18 |

@recipe.Name

19 |

@recipe.Description

20 |
21 | } 22 | 23 |
24 | -------------------------------------------------------------------------------- /Ch05/05_03_Begin/TopsyTurvyCakes/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using TopsyTurvyCakes.Models 2 | @namespace TopsyTurvyCakes.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | @inject IRecipesService RecipesService 5 | -------------------------------------------------------------------------------- /Ch05/05_03_Begin/TopsyTurvyCakes/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /Ch05/05_03_Begin/TopsyTurvyCakes/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace TopsyTurvyCakes 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup() 23 | .Build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Ch05/05_03_Begin/TopsyTurvyCakes/TopsyTurvyCakes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Ch05/05_03_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch05/05_03_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Ch05/05_03_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch05/05_03_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Ch05/05_03_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch05/05_03_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Ch05/05_03_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch05/05_03_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /Ch05/05_03_End/TopsyTurvyCakes/Models/IRecipesService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | 4 | namespace TopsyTurvyCakes.Models 5 | { 6 | public interface IRecipesService 7 | { 8 | Task DeleteAsync(long id); 9 | Recipe Find(long id); 10 | Task FindAsync(long id); 11 | IQueryable GetAll(int? count = null, int? page = null); 12 | Task GetAllAsync(int? count = null, int? page = null); 13 | Task SaveAsync(Recipe recipe); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch05/05_03_End/TopsyTurvyCakes/Models/RecipesDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace TopsyTurvyCakes.Models 4 | { 5 | public class RecipesDbContext : DbContext 6 | { 7 | public DbSet Recipes { get; set; } 8 | 9 | public RecipesDbContext(DbContextOptions options) 10 | : base(options) 11 | { 12 | this.EnsureSeedData(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch05/05_03_End/TopsyTurvyCakes/Pages/Index.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @{ 3 | var recipes = await RecipesService.GetAllAsync(); 4 | } 5 | 6 | @section Title { 7 |

My Favorite Recipes

8 | Add Recipe 9 | } 10 | 11 | 12 |
13 | 14 | @foreach (var recipe in recipes) 15 | { 16 |
17 | 18 |

@recipe.Name

19 |

@recipe.Description

20 |
21 | } 22 | 23 |
24 | -------------------------------------------------------------------------------- /Ch05/05_03_End/TopsyTurvyCakes/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using TopsyTurvyCakes.Models 2 | @namespace TopsyTurvyCakes.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | @inject IRecipesService RecipesService 5 | -------------------------------------------------------------------------------- /Ch05/05_03_End/TopsyTurvyCakes/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /Ch05/05_03_End/TopsyTurvyCakes/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace TopsyTurvyCakes 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup() 23 | .Build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Ch05/05_03_End/TopsyTurvyCakes/TopsyTurvyCakes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Ch05/05_03_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch05/05_03_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Ch05/05_03_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch05/05_03_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Ch05/05_03_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch05/05_03_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Ch05/05_03_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch05/05_03_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /Ch05/05_04_Begin/TopsyTurvyCakes/Models/IRecipesService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | 4 | namespace TopsyTurvyCakes.Models 5 | { 6 | public interface IRecipesService 7 | { 8 | Task DeleteAsync(long id); 9 | Recipe Find(long id); 10 | Task FindAsync(long id); 11 | IQueryable GetAll(int? count = null, int? page = null); 12 | Task GetAllAsync(int? count = null, int? page = null); 13 | Task SaveAsync(Recipe recipe); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch05/05_04_Begin/TopsyTurvyCakes/Models/RecipesDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace TopsyTurvyCakes.Models 4 | { 5 | public class RecipesDbContext : DbContext 6 | { 7 | public DbSet Recipes { get; set; } 8 | 9 | public RecipesDbContext(DbContextOptions options) 10 | : base(options) 11 | { 12 | this.EnsureSeedData(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch05/05_04_Begin/TopsyTurvyCakes/Pages/Index.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @{ 3 | var recipes = await RecipesService.GetAllAsync(); 4 | } 5 | 6 | @section Title { 7 |

My Favorite Recipes

8 | Add Recipe 9 | } 10 | 11 | 12 |
13 | 14 | @foreach (var recipe in recipes) 15 | { 16 |
17 | 18 |

@recipe.Name

19 |

@recipe.Description

20 |
21 | } 22 | 23 |
24 | -------------------------------------------------------------------------------- /Ch05/05_04_Begin/TopsyTurvyCakes/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using TopsyTurvyCakes.Models 2 | @namespace TopsyTurvyCakes.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | @inject IRecipesService RecipesService 5 | -------------------------------------------------------------------------------- /Ch05/05_04_Begin/TopsyTurvyCakes/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /Ch05/05_04_Begin/TopsyTurvyCakes/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace TopsyTurvyCakes 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup() 23 | .Build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Ch05/05_04_Begin/TopsyTurvyCakes/TopsyTurvyCakes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Ch05/05_04_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch05/05_04_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Ch05/05_04_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch05/05_04_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Ch05/05_04_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch05/05_04_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Ch05/05_04_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch05/05_04_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /Ch05/05_04_End/TopsyTurvyCakes/Models/IRecipesService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | 4 | namespace TopsyTurvyCakes.Models 5 | { 6 | public interface IRecipesService 7 | { 8 | Task DeleteAsync(long id); 9 | Recipe Find(long id); 10 | Task FindAsync(long id); 11 | IQueryable GetAll(int? count = null, int? page = null); 12 | Task GetAllAsync(int? count = null, int? page = null); 13 | Task SaveAsync(Recipe recipe); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch05/05_04_End/TopsyTurvyCakes/Models/RecipesDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace TopsyTurvyCakes.Models 4 | { 5 | public class RecipesDbContext : DbContext 6 | { 7 | public DbSet Recipes { get; set; } 8 | 9 | public RecipesDbContext(DbContextOptions options) 10 | : base(options) 11 | { 12 | this.EnsureSeedData(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch05/05_04_End/TopsyTurvyCakes/Pages/Index.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @{ 3 | var recipes = await RecipesService.GetAllAsync(); 4 | } 5 | 6 | @section Title { 7 |

My Favorite Recipes

8 | Add Recipe 9 | } 10 | 11 | 12 |
13 | 14 | @foreach (var recipe in recipes) 15 | { 16 |
17 | 18 |

@recipe.Name

19 |

@recipe.Description

20 |
21 | } 22 | 23 |
24 | -------------------------------------------------------------------------------- /Ch05/05_04_End/TopsyTurvyCakes/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using TopsyTurvyCakes.Models 2 | @namespace TopsyTurvyCakes.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | @inject IRecipesService RecipesService 5 | -------------------------------------------------------------------------------- /Ch05/05_04_End/TopsyTurvyCakes/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /Ch05/05_04_End/TopsyTurvyCakes/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace TopsyTurvyCakes 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup() 23 | .Build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Ch05/05_04_End/TopsyTurvyCakes/TopsyTurvyCakes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Ch05/05_04_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch05/05_04_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Ch05/05_04_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch05/05_04_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Ch05/05_04_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch05/05_04_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Ch05/05_04_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch05/05_04_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /Ch05/05_Challenge/TopsyTurvyCakes/Models/IRecipesService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | 4 | namespace TopsyTurvyCakes.Models 5 | { 6 | public interface IRecipesService 7 | { 8 | Task DeleteAsync(long id); 9 | Recipe Find(long id); 10 | Task FindAsync(long id); 11 | IQueryable GetAll(int? count = null, int? page = null); 12 | Task GetAllAsync(int? count = null, int? page = null); 13 | Task SaveAsync(Recipe recipe); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch05/05_Challenge/TopsyTurvyCakes/Models/RecipesDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace TopsyTurvyCakes.Models 4 | { 5 | public class RecipesDbContext : DbContext 6 | { 7 | public DbSet Recipes { get; set; } 8 | 9 | public RecipesDbContext(DbContextOptions options) 10 | : base(options) 11 | { 12 | this.EnsureSeedData(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch05/05_Challenge/TopsyTurvyCakes/Pages/Index.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @{ 3 | var recipes = await RecipesService.GetAllAsync(); 4 | } 5 | 6 | @section Title { 7 |

My Favorite Recipes

8 | Add Recipe 9 | } 10 | 11 | 12 |
13 | 14 | @foreach (var recipe in recipes) 15 | { 16 |
17 | 18 |

@recipe.Name

19 |

@recipe.Description

20 |
21 | } 22 | 23 |
24 | -------------------------------------------------------------------------------- /Ch05/05_Challenge/TopsyTurvyCakes/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using TopsyTurvyCakes.Models 2 | @namespace TopsyTurvyCakes.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | @inject IRecipesService RecipesService 5 | -------------------------------------------------------------------------------- /Ch05/05_Challenge/TopsyTurvyCakes/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /Ch05/05_Challenge/TopsyTurvyCakes/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace TopsyTurvyCakes 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup() 23 | .Build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Ch05/05_Challenge/TopsyTurvyCakes/TopsyTurvyCakes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Ch05/05_Challenge/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch05/05_Challenge/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Ch05/05_Challenge/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch05/05_Challenge/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Ch05/05_Challenge/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch05/05_Challenge/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Ch05/05_Challenge/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch05/05_Challenge/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /Ch05/05_Solution/TopsyTurvyCakes/Models/IRecipesService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | 4 | namespace TopsyTurvyCakes.Models 5 | { 6 | public interface IRecipesService 7 | { 8 | Task DeleteAsync(long id); 9 | Recipe Find(long id); 10 | Task FindAsync(long id); 11 | IQueryable GetAll(int? count = null, int? page = null); 12 | Task GetAllAsync(int? count = null, int? page = null); 13 | Task SaveAsync(Recipe recipe); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch05/05_Solution/TopsyTurvyCakes/Models/RecipesDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace TopsyTurvyCakes.Models 4 | { 5 | public class RecipesDbContext : DbContext 6 | { 7 | public DbSet Recipes { get; set; } 8 | 9 | public RecipesDbContext(DbContextOptions options) 10 | : base(options) 11 | { 12 | this.EnsureSeedData(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch05/05_Solution/TopsyTurvyCakes/Pages/Index.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @{ 3 | var recipes = await RecipesService.GetAllAsync(); 4 | } 5 | 6 | @section Title { 7 |

My Favorite Recipes

8 | Add Recipe 9 | } 10 | 11 | 12 |
13 | 14 | @foreach (var recipe in recipes) 15 | { 16 |
17 | 18 |

@recipe.Name

19 |

@recipe.Description

20 |
21 | } 22 | 23 |
24 | -------------------------------------------------------------------------------- /Ch05/05_Solution/TopsyTurvyCakes/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using TopsyTurvyCakes.Models 2 | @namespace TopsyTurvyCakes.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | @inject IRecipesService RecipesService 5 | -------------------------------------------------------------------------------- /Ch05/05_Solution/TopsyTurvyCakes/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /Ch05/05_Solution/TopsyTurvyCakes/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace TopsyTurvyCakes 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup() 23 | .Build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Ch05/05_Solution/TopsyTurvyCakes/TopsyTurvyCakes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Ch05/05_Solution/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch05/05_Solution/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Ch05/05_Solution/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch05/05_Solution/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Ch05/05_Solution/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch05/05_Solution/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Ch05/05_Solution/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch05/05_Solution/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /Ch06/06_01_Begin/TopsyTurvyCakes/Models/IRecipesService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | 4 | namespace TopsyTurvyCakes.Models 5 | { 6 | public interface IRecipesService 7 | { 8 | Task DeleteAsync(long id); 9 | Recipe Find(long id); 10 | Task FindAsync(long id); 11 | IQueryable GetAll(int? count = null, int? page = null); 12 | Task GetAllAsync(int? count = null, int? page = null); 13 | Task SaveAsync(Recipe recipe); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch06/06_01_Begin/TopsyTurvyCakes/Models/RecipesDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace TopsyTurvyCakes.Models 4 | { 5 | public class RecipesDbContext : DbContext 6 | { 7 | public DbSet Recipes { get; set; } 8 | 9 | public RecipesDbContext(DbContextOptions options) 10 | : base(options) 11 | { 12 | this.EnsureSeedData(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch06/06_01_Begin/TopsyTurvyCakes/Pages/Index.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @{ 3 | var recipes = await RecipesService.GetAllAsync(); 4 | } 5 | 6 | @section Title { 7 |

My Favorite Recipes

8 | Add Recipe 9 | } 10 | 11 | 12 |
13 | 14 | @foreach (var recipe in recipes) 15 | { 16 |
17 | 18 |

@recipe.Name

19 |

@recipe.Description

20 |
21 | } 22 | 23 |
24 | -------------------------------------------------------------------------------- /Ch06/06_01_Begin/TopsyTurvyCakes/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using TopsyTurvyCakes.Models 2 | @namespace TopsyTurvyCakes.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | @inject IRecipesService RecipesService 5 | -------------------------------------------------------------------------------- /Ch06/06_01_Begin/TopsyTurvyCakes/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /Ch06/06_01_Begin/TopsyTurvyCakes/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace TopsyTurvyCakes 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup() 23 | .Build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Ch06/06_01_Begin/TopsyTurvyCakes/TopsyTurvyCakes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Ch06/06_01_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch06/06_01_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Ch06/06_01_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch06/06_01_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Ch06/06_01_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch06/06_01_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Ch06/06_01_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch06/06_01_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /Ch06/06_01_End/TopsyTurvyCakes/Models/IRecipesService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | 4 | namespace TopsyTurvyCakes.Models 5 | { 6 | public interface IRecipesService 7 | { 8 | Task DeleteAsync(long id); 9 | Recipe Find(long id); 10 | Task FindAsync(long id); 11 | IQueryable GetAll(int? count = null, int? page = null); 12 | Task GetAllAsync(int? count = null, int? page = null); 13 | Task SaveAsync(Recipe recipe); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch06/06_01_End/TopsyTurvyCakes/Models/RecipesDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace TopsyTurvyCakes.Models 4 | { 5 | public class RecipesDbContext : DbContext 6 | { 7 | public DbSet Recipes { get; set; } 8 | 9 | public RecipesDbContext(DbContextOptions options) 10 | : base(options) 11 | { 12 | this.EnsureSeedData(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch06/06_01_End/TopsyTurvyCakes/Pages/Index.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @{ 3 | var recipes = await RecipesService.GetAllAsync(); 4 | } 5 | 6 | @section Title { 7 |

My Favorite Recipes

8 | Add Recipe 9 | } 10 | 11 | 12 |
13 | 14 | @foreach (var recipe in recipes) 15 | { 16 |
17 | 18 |

@recipe.Name

19 |

@recipe.Description

20 |
21 | } 22 | 23 |
24 | -------------------------------------------------------------------------------- /Ch06/06_01_End/TopsyTurvyCakes/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using TopsyTurvyCakes.Models 2 | @namespace TopsyTurvyCakes.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | @inject IRecipesService RecipesService 5 | -------------------------------------------------------------------------------- /Ch06/06_01_End/TopsyTurvyCakes/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /Ch06/06_01_End/TopsyTurvyCakes/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace TopsyTurvyCakes 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup() 23 | .Build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Ch06/06_01_End/TopsyTurvyCakes/TopsyTurvyCakes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Ch06/06_01_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch06/06_01_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Ch06/06_01_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch06/06_01_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Ch06/06_01_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch06/06_01_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Ch06/06_01_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch06/06_01_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /Ch06/06_02_Begin/TopsyTurvyCakes/Models/IRecipesService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | 4 | namespace TopsyTurvyCakes.Models 5 | { 6 | public interface IRecipesService 7 | { 8 | Task DeleteAsync(long id); 9 | Recipe Find(long id); 10 | Task FindAsync(long id); 11 | IQueryable GetAll(int? count = null, int? page = null); 12 | Task GetAllAsync(int? count = null, int? page = null); 13 | Task SaveAsync(Recipe recipe); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch06/06_02_Begin/TopsyTurvyCakes/Models/RecipesDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace TopsyTurvyCakes.Models 4 | { 5 | public class RecipesDbContext : DbContext 6 | { 7 | public DbSet Recipes { get; set; } 8 | 9 | public RecipesDbContext(DbContextOptions options) 10 | : base(options) 11 | { 12 | this.EnsureSeedData(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch06/06_02_Begin/TopsyTurvyCakes/Pages/Index.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @{ 3 | var recipes = await RecipesService.GetAllAsync(); 4 | } 5 | 6 | @section Title { 7 |

My Favorite Recipes

8 | Add Recipe 9 | } 10 | 11 | 12 |
13 | 14 | @foreach (var recipe in recipes) 15 | { 16 |
17 | 18 |

@recipe.Name

19 |

@recipe.Description

20 |
21 | } 22 | 23 |
24 | -------------------------------------------------------------------------------- /Ch06/06_02_Begin/TopsyTurvyCakes/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using TopsyTurvyCakes.Models 2 | @namespace TopsyTurvyCakes.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | @inject IRecipesService RecipesService 5 | -------------------------------------------------------------------------------- /Ch06/06_02_Begin/TopsyTurvyCakes/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /Ch06/06_02_Begin/TopsyTurvyCakes/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace TopsyTurvyCakes 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup() 23 | .Build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Ch06/06_02_Begin/TopsyTurvyCakes/TopsyTurvyCakes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Ch06/06_02_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch06/06_02_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Ch06/06_02_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch06/06_02_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Ch06/06_02_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch06/06_02_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Ch06/06_02_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch06/06_02_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /Ch06/06_02_End/TopsyTurvyCakes/Models/IRecipesService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | 4 | namespace TopsyTurvyCakes.Models 5 | { 6 | public interface IRecipesService 7 | { 8 | Task DeleteAsync(long id); 9 | Recipe Find(long id); 10 | Task FindAsync(long id); 11 | IQueryable GetAll(int? count = null, int? page = null); 12 | Task GetAllAsync(int? count = null, int? page = null); 13 | Task SaveAsync(Recipe recipe); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch06/06_02_End/TopsyTurvyCakes/Models/RecipesDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace TopsyTurvyCakes.Models 4 | { 5 | public class RecipesDbContext : DbContext 6 | { 7 | public DbSet Recipes { get; set; } 8 | 9 | public RecipesDbContext(DbContextOptions options) 10 | : base(options) 11 | { 12 | this.EnsureSeedData(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch06/06_02_End/TopsyTurvyCakes/Pages/Index.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @{ 3 | var recipes = await RecipesService.GetAllAsync(); 4 | } 5 | 6 | @section Title { 7 |

My Favorite Recipes

8 | Add Recipe 9 | } 10 | 11 | 12 |
13 | 14 | @foreach (var recipe in recipes) 15 | { 16 |
17 | 18 |

@recipe.Name

19 |

@recipe.Description

20 |
21 | } 22 | 23 |
24 | -------------------------------------------------------------------------------- /Ch06/06_02_End/TopsyTurvyCakes/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using TopsyTurvyCakes.Models 2 | @namespace TopsyTurvyCakes.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | @inject IRecipesService RecipesService 5 | -------------------------------------------------------------------------------- /Ch06/06_02_End/TopsyTurvyCakes/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /Ch06/06_02_End/TopsyTurvyCakes/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace TopsyTurvyCakes 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup() 23 | .Build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Ch06/06_02_End/TopsyTurvyCakes/TopsyTurvyCakes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Ch06/06_02_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch06/06_02_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Ch06/06_02_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch06/06_02_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Ch06/06_02_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch06/06_02_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Ch06/06_02_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch06/06_02_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /Ch06/06_03_Begin/TopsyTurvyCakes/Models/IRecipesService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | 4 | namespace TopsyTurvyCakes.Models 5 | { 6 | public interface IRecipesService 7 | { 8 | Task DeleteAsync(long id); 9 | Recipe Find(long id); 10 | Task FindAsync(long id); 11 | IQueryable GetAll(int? count = null, int? page = null); 12 | Task GetAllAsync(int? count = null, int? page = null); 13 | Task SaveAsync(Recipe recipe); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch06/06_03_Begin/TopsyTurvyCakes/Models/RecipesDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace TopsyTurvyCakes.Models 4 | { 5 | public class RecipesDbContext : DbContext 6 | { 7 | public DbSet Recipes { get; set; } 8 | 9 | public RecipesDbContext(DbContextOptions options) 10 | : base(options) 11 | { 12 | this.EnsureSeedData(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch06/06_03_Begin/TopsyTurvyCakes/Pages/Index.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @{ 3 | var recipes = await RecipesService.GetAllAsync(); 4 | } 5 | 6 | @section Title { 7 |

My Favorite Recipes

8 | Add Recipe 9 | } 10 | 11 | 12 |
13 | 14 | @foreach (var recipe in recipes) 15 | { 16 |
17 | 18 |

@recipe.Name

19 |

@recipe.Description

20 |
21 | } 22 | 23 |
24 | -------------------------------------------------------------------------------- /Ch06/06_03_Begin/TopsyTurvyCakes/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using TopsyTurvyCakes.Models 2 | @namespace TopsyTurvyCakes.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | @inject IRecipesService RecipesService 5 | -------------------------------------------------------------------------------- /Ch06/06_03_Begin/TopsyTurvyCakes/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /Ch06/06_03_Begin/TopsyTurvyCakes/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace TopsyTurvyCakes 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup() 23 | .Build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Ch06/06_03_Begin/TopsyTurvyCakes/TopsyTurvyCakes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Ch06/06_03_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch06/06_03_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Ch06/06_03_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch06/06_03_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Ch06/06_03_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch06/06_03_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Ch06/06_03_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch06/06_03_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /Ch06/06_03_End/TopsyTurvyCakes/Models/IRecipesService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | 4 | namespace TopsyTurvyCakes.Models 5 | { 6 | public interface IRecipesService 7 | { 8 | Task DeleteAsync(long id); 9 | Recipe Find(long id); 10 | Task FindAsync(long id); 11 | IQueryable GetAll(int? count = null, int? page = null); 12 | Task GetAllAsync(int? count = null, int? page = null); 13 | Task SaveAsync(Recipe recipe); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch06/06_03_End/TopsyTurvyCakes/Models/RecipesDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace TopsyTurvyCakes.Models 4 | { 5 | public class RecipesDbContext : DbContext 6 | { 7 | public DbSet Recipes { get; set; } 8 | 9 | public RecipesDbContext(DbContextOptions options) 10 | : base(options) 11 | { 12 | this.EnsureSeedData(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch06/06_03_End/TopsyTurvyCakes/Pages/Account/Login.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model LoginModel 3 | @{ 4 | ViewData["Title"] = "Login"; 5 | } 6 | -------------------------------------------------------------------------------- /Ch06/06_03_End/TopsyTurvyCakes/Pages/Account/Login.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | 8 | namespace TopsyTurvyCakes.Pages.Account 9 | { 10 | public class LoginModel : PageModel 11 | { 12 | public void OnGet() 13 | { 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /Ch06/06_03_End/TopsyTurvyCakes/Pages/Account/Profile.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model ProfileModel 3 | @{ 4 | ViewData["Title"] = "Profile"; 5 | } 6 | -------------------------------------------------------------------------------- /Ch06/06_03_End/TopsyTurvyCakes/Pages/Account/Profile.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | 8 | namespace TopsyTurvyCakes.Pages.Account 9 | { 10 | public class ProfileModel : PageModel 11 | { 12 | public void OnGet() 13 | { 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /Ch06/06_03_End/TopsyTurvyCakes/Pages/Index.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @{ 3 | var recipes = await RecipesService.GetAllAsync(); 4 | } 5 | 6 | @section Title { 7 |

My Favorite Recipes

8 | Add Recipe 9 | } 10 | 11 | 12 |
13 | 14 | @foreach (var recipe in recipes) 15 | { 16 |
17 | 18 |

@recipe.Name

19 |

@recipe.Description

20 |
21 | } 22 | 23 |
24 | -------------------------------------------------------------------------------- /Ch06/06_03_End/TopsyTurvyCakes/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using TopsyTurvyCakes.Models 2 | @namespace TopsyTurvyCakes.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | @inject IRecipesService RecipesService 5 | -------------------------------------------------------------------------------- /Ch06/06_03_End/TopsyTurvyCakes/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /Ch06/06_03_End/TopsyTurvyCakes/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace TopsyTurvyCakes 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup() 23 | .Build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Ch06/06_03_End/TopsyTurvyCakes/TopsyTurvyCakes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Ch06/06_03_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch06/06_03_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Ch06/06_03_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch06/06_03_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Ch06/06_03_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch06/06_03_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Ch06/06_03_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch06/06_03_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /Ch06/06_04_Begin/TopsyTurvyCakes/Models/IRecipesService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | 4 | namespace TopsyTurvyCakes.Models 5 | { 6 | public interface IRecipesService 7 | { 8 | Task DeleteAsync(long id); 9 | Recipe Find(long id); 10 | Task FindAsync(long id); 11 | IQueryable GetAll(int? count = null, int? page = null); 12 | Task GetAllAsync(int? count = null, int? page = null); 13 | Task SaveAsync(Recipe recipe); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch06/06_04_Begin/TopsyTurvyCakes/Models/RecipesDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace TopsyTurvyCakes.Models 4 | { 5 | public class RecipesDbContext : DbContext 6 | { 7 | public DbSet Recipes { get; set; } 8 | 9 | public RecipesDbContext(DbContextOptions options) 10 | : base(options) 11 | { 12 | this.EnsureSeedData(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch06/06_04_Begin/TopsyTurvyCakes/Pages/Account/Login.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model LoginModel 3 | @{ 4 | ViewData["Title"] = "Login"; 5 | } 6 | -------------------------------------------------------------------------------- /Ch06/06_04_Begin/TopsyTurvyCakes/Pages/Account/Login.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | 8 | namespace TopsyTurvyCakes.Pages.Account 9 | { 10 | public class LoginModel : PageModel 11 | { 12 | public void OnGet() 13 | { 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /Ch06/06_04_Begin/TopsyTurvyCakes/Pages/Account/Profile.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model ProfileModel 3 | @{ 4 | ViewData["Title"] = "Profile"; 5 | } 6 | -------------------------------------------------------------------------------- /Ch06/06_04_Begin/TopsyTurvyCakes/Pages/Account/Profile.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | 8 | namespace TopsyTurvyCakes.Pages.Account 9 | { 10 | public class ProfileModel : PageModel 11 | { 12 | public void OnGet() 13 | { 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /Ch06/06_04_Begin/TopsyTurvyCakes/Pages/Index.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @{ 3 | var recipes = await RecipesService.GetAllAsync(); 4 | } 5 | 6 | @section Title { 7 |

My Favorite Recipes

8 | Add Recipe 9 | } 10 | 11 | 12 |
13 | 14 | @foreach (var recipe in recipes) 15 | { 16 |
17 | 18 |

@recipe.Name

19 |

@recipe.Description

20 |
21 | } 22 | 23 |
24 | -------------------------------------------------------------------------------- /Ch06/06_04_Begin/TopsyTurvyCakes/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using TopsyTurvyCakes.Models 2 | @namespace TopsyTurvyCakes.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | @inject IRecipesService RecipesService 5 | -------------------------------------------------------------------------------- /Ch06/06_04_Begin/TopsyTurvyCakes/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /Ch06/06_04_Begin/TopsyTurvyCakes/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace TopsyTurvyCakes 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup() 23 | .Build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Ch06/06_04_Begin/TopsyTurvyCakes/TopsyTurvyCakes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Ch06/06_04_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch06/06_04_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Ch06/06_04_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch06/06_04_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Ch06/06_04_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch06/06_04_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Ch06/06_04_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch06/06_04_Begin/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /Ch06/06_04_End/TopsyTurvyCakes/Models/IRecipesService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | 4 | namespace TopsyTurvyCakes.Models 5 | { 6 | public interface IRecipesService 7 | { 8 | Task DeleteAsync(long id); 9 | Recipe Find(long id); 10 | Task FindAsync(long id); 11 | IQueryable GetAll(int? count = null, int? page = null); 12 | Task GetAllAsync(int? count = null, int? page = null); 13 | Task SaveAsync(Recipe recipe); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch06/06_04_End/TopsyTurvyCakes/Models/RecipesDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace TopsyTurvyCakes.Models 4 | { 5 | public class RecipesDbContext : DbContext 6 | { 7 | public DbSet Recipes { get; set; } 8 | 9 | public RecipesDbContext(DbContextOptions options) 10 | : base(options) 11 | { 12 | this.EnsureSeedData(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Ch06/06_04_End/TopsyTurvyCakes/Pages/Account/Profile.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model ProfileModel 3 | @{ 4 | ViewData["Title"] = "Profile"; 5 | } 6 | -------------------------------------------------------------------------------- /Ch06/06_04_End/TopsyTurvyCakes/Pages/Account/Profile.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | 8 | namespace TopsyTurvyCakes.Pages.Account 9 | { 10 | public class ProfileModel : PageModel 11 | { 12 | public void OnGet() 13 | { 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /Ch06/06_04_End/TopsyTurvyCakes/Pages/Index.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @{ 3 | var recipes = await RecipesService.GetAllAsync(); 4 | } 5 | 6 | @section Title { 7 |

My Favorite Recipes

8 | Add Recipe 9 | } 10 | 11 | 12 |
13 | 14 | @foreach (var recipe in recipes) 15 | { 16 |
17 | 18 |

@recipe.Name

19 |

@recipe.Description

20 |
21 | } 22 | 23 |
24 | -------------------------------------------------------------------------------- /Ch06/06_04_End/TopsyTurvyCakes/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using TopsyTurvyCakes.Models 2 | @namespace TopsyTurvyCakes.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | @inject IRecipesService RecipesService 5 | -------------------------------------------------------------------------------- /Ch06/06_04_End/TopsyTurvyCakes/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /Ch06/06_04_End/TopsyTurvyCakes/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace TopsyTurvyCakes 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup() 23 | .Build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Ch06/06_04_End/TopsyTurvyCakes/TopsyTurvyCakes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Ch06/06_04_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch06/06_04_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Ch06/06_04_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch06/06_04_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Ch06/06_04_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch06/06_04_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Ch06/06_04_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jchadwick/LearnAspNetCoreRazorPages/2d70c7fd51d1d0b951ab707b6a47a2f2661f7eeb/Ch06/06_04_End/TopsyTurvyCakes/wwwroot/fonts/glyphicons-halflings-regular.woff2 --------------------------------------------------------------------------------