GetAllAsync(int? count = null, int? page = null);
13 | Task SaveAsync(Recipe recipe);
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 |
17 |
@recipe.Description
18 |
19 | }
20 |
21 |
22 |
--------------------------------------------------------------------------------
/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 |
17 |
@recipe.Description
18 |
19 | }
20 |
21 |
22 |
--------------------------------------------------------------------------------
/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 |
19 |
@recipe.Description
20 |
21 | }
22 |
23 |
24 |
--------------------------------------------------------------------------------
/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 |
19 |
@recipe.Description
20 |
21 | }
22 |
23 |
24 |
--------------------------------------------------------------------------------
/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 |
19 |
@recipe.Description
20 |
21 | }
22 |
23 |
24 |
--------------------------------------------------------------------------------
/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 |
19 |
@recipe.Description
20 |
21 | }
22 |
23 |
24 |
--------------------------------------------------------------------------------
/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 |
19 |
@recipe.Description
20 |
21 | }
22 |
23 |
24 |
--------------------------------------------------------------------------------
/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 |
19 |
@recipe.Description
20 |
21 | }
22 |
23 |
24 |
--------------------------------------------------------------------------------
/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 |
19 |
@recipe.Description
20 |
21 | }
22 |
23 |
24 |
--------------------------------------------------------------------------------
/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 |
19 |
@recipe.Description
20 |
21 | }
22 |
23 |
24 |
--------------------------------------------------------------------------------
/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 |
19 |
@recipe.Description
20 |
21 | }
22 |
23 |
24 |
--------------------------------------------------------------------------------
/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 |
19 |
@recipe.Description
20 |
21 | }
22 |
23 |
24 |
--------------------------------------------------------------------------------
/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 |
19 |
@recipe.Description
20 |
21 | }
22 |
23 |
24 |
--------------------------------------------------------------------------------
/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 |
19 |
@recipe.Description
20 |
21 | }
22 |
23 |
24 |
--------------------------------------------------------------------------------
/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 |
19 |
@recipe.Description
20 |
21 | }
22 |
23 |
24 |
--------------------------------------------------------------------------------
/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 |
19 |
@recipe.Description
20 |
21 | }
22 |
23 |
24 |
--------------------------------------------------------------------------------
/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 |
19 |
@recipe.Description
20 |
21 | }
22 |
23 |
24 |
--------------------------------------------------------------------------------
/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 |
19 |
@recipe.Description
20 |
21 | }
22 |
23 |
24 |
--------------------------------------------------------------------------------
/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 |
19 |
@recipe.Description
20 |
21 | }
22 |
23 |
24 |
--------------------------------------------------------------------------------
/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 |
19 |
@recipe.Description
20 |
21 | }
22 |
23 |
24 |
--------------------------------------------------------------------------------
/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 |
19 |
@recipe.Description
20 |
21 | }
22 |
23 |
24 |
--------------------------------------------------------------------------------
/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_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_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_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_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_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 | }
--------------------------------------------------------------------------------
/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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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 |
--------------------------------------------------------------------------------
/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_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_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_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_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_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_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_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/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 |
20 |
@recipe.Description
21 |
22 | }
23 |
24 |
25 |
--------------------------------------------------------------------------------
/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 |
20 |
@recipe.Description
21 |
22 | }
23 |
24 |
25 |
--------------------------------------------------------------------------------
/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 |
20 |
@recipe.Description
21 |
22 | }
23 |
24 |
25 |
--------------------------------------------------------------------------------
/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 |
20 |
@recipe.Description
21 |
22 | }
23 |
24 |
25 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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_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_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_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_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_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_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_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_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_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_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 |
--------------------------------------------------------------------------------
/Ch03/03_01_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 |
--------------------------------------------------------------------------------
/Ch03/03_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 |
--------------------------------------------------------------------------------
/Ch03/03_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 |
--------------------------------------------------------------------------------
/Ch03/03_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 |
--------------------------------------------------------------------------------
/Ch03/03_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 |
--------------------------------------------------------------------------------