Skip to content

Commit 14927bd

Browse files
committed
FD revisions for Ch11
1 parent c0f1e5c commit 14927bd

File tree

5 files changed

+21
-21
lines changed

5 files changed

+21
-21
lines changed

code/Chapter11/LinqWithEFCore/Program.Functions.cs

+11-11
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
partial class Program
66
{
7-
static void FilterAndSort()
7+
private static void FilterAndSort()
88
{
99
SectionTitle("Filter and sort");
1010

@@ -39,7 +39,7 @@ static void FilterAndSort()
3939
WriteLine();
4040
}
4141

42-
static void JoinCategoriesAndProducts()
42+
private static void JoinCategoriesAndProducts()
4343
{
4444
SectionTitle("Join categories and products");
4545

@@ -60,7 +60,7 @@ static void JoinCategoriesAndProducts()
6060
}
6161
}
6262

63-
static void GroupJoinCategoriesAndProducts()
63+
private static void GroupJoinCategoriesAndProducts()
6464
{
6565
SectionTitle("Group join categories and products");
6666

@@ -88,7 +88,7 @@ static void GroupJoinCategoriesAndProducts()
8888
}
8989
}
9090

91-
static void ProductsLookup()
91+
private static void ProductsLookup()
9292
{
9393
SectionTitle("Products lookup");
9494

@@ -128,7 +128,7 @@ static void ProductsLookup()
128128
}
129129
}
130130

131-
static void AggregateProducts()
131+
private static void AggregateProducts()
132132
{
133133
SectionTitle("Aggregate products");
134134

@@ -177,7 +177,7 @@ static void AggregateProducts()
177177
.Sum(p => p.UnitPrice * p.UnitsInStock),10:$#,##0.00}");
178178
}
179179

180-
static void OutputTableOfProducts(Product[] products,
180+
private static void OutputTableOfProducts(Product[] products,
181181
int currentPage, int totalPages)
182182
{
183183
string line = new('-', count: 73);
@@ -197,7 +197,7 @@ static void OutputTableOfProducts(Product[] products,
197197
lineHalf, currentPage + 1, totalPages + 1, lineHalf);
198198
}
199199

200-
static void OutputPageOfProducts(IQueryable<Product> products,
200+
private static void OutputPageOfProducts(IQueryable<Product> products,
201201
int pageSize, int currentPage, int totalPages)
202202
{
203203
// We must order data before skipping and taking to ensure
@@ -213,7 +213,7 @@ static void OutputPageOfProducts(IQueryable<Product> products,
213213
currentPage, totalPages);
214214
}
215215

216-
static void PagingProducts()
216+
private static void PagingProducts()
217217
{
218218
SectionTitle("Paging products");
219219

@@ -242,7 +242,7 @@ static void PagingProducts()
242242
}
243243
}
244244

245-
static void OutputProductsAsXml()
245+
private static void OutputProductsAsXml()
246246
{
247247
SectionTitle("Output products as XML");
248248

@@ -260,7 +260,7 @@ from p in productsArray
260260
WriteLine(xml.ToString());
261261
}
262262

263-
static void ProcessSettings()
263+
private static void ProcessSettings()
264264
{
265265
string path = Path.Combine(
266266
Environment.CurrentDirectory, "settings.xml");
@@ -282,7 +282,7 @@ static void ProcessSettings()
282282
}
283283
}
284284

285-
static void CustomExtensionMethods()
285+
private static void CustomExtensionMethods()
286286
{
287287
SectionTitle("Custom aggregate extension methods");
288288

code/Chapter11/LinqWithEFCore/Program.Helpers.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
partial class Program
44
{
5-
static void ConfigureConsole(string culture = "en-US",
5+
private static void ConfigureConsole(string culture = "en-US",
66
bool useComputerCulture = false)
77
{
88
// To enable Unicode characters like Euro symbol in the console.
@@ -15,7 +15,7 @@ static void ConfigureConsole(string culture = "en-US",
1515
WriteLine($"CurrentCulture: {CultureInfo.CurrentCulture.DisplayName}");
1616
}
1717

18-
static void SectionTitle(string title)
18+
private static void SectionTitle(string title)
1919
{
2020
ConsoleColor previousColor = ForegroundColor;
2121
ForegroundColor = ConsoleColor.DarkYellow;

code/Chapter11/LinqWithObjects/Program.Functions.cs

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
partial class Program
22
{
3-
static void DeferredExecution(string[] names)
3+
private static void DeferredExecution(string[] names)
44
{
55
SectionTitle("Deferred execution");
66

@@ -29,7 +29,7 @@ static void DeferredExecution(string[] names)
2929
}
3030
}
3131

32-
static void FilteringUsingWhere(string[] names)
32+
private static void FilteringUsingWhere(string[] names)
3333
{
3434
SectionTitle("Filtering entities using Where");
3535

@@ -52,13 +52,13 @@ static void FilteringUsingWhere(string[] names)
5252
}
5353
}
5454

55-
static bool NameLongerThanFour(string name)
55+
private static bool NameLongerThanFour(string name)
5656
{
5757
// Returns true for a name longer than four characters.
5858
return name.Length > 4;
5959
}
6060

61-
static void FilteringByType()
61+
private static void FilteringByType()
6262
{
6363
SectionTitle("Filtering by type");
6464

@@ -80,7 +80,7 @@ static void FilteringByType()
8080
}
8181
}
8282

83-
static void Output(IEnumerable<string> cohort, string description = "")
83+
private static void Output(IEnumerable<string> cohort, string description = "")
8484
{
8585
if (!string.IsNullOrEmpty(description))
8686
{
@@ -91,7 +91,7 @@ static void Output(IEnumerable<string> cohort, string description = "")
9191
WriteLine();
9292
}
9393

94-
static void WorkingWithSets()
94+
private static void WorkingWithSets()
9595
{
9696
string[] cohort1 =
9797
{ "Rachel", "Gareth", "Jonathan", "George" };

code/Chapter11/LinqWithObjects/Program.Helpers.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
partial class Program
22
{
3-
static void SectionTitle(string title)
3+
private static void SectionTitle(string title)
44
{
55
ConsoleColor previousColor = ForegroundColor;
66
ForegroundColor = ConsoleColor.DarkYellow;

docs/ch15-minimal-apis.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ catch (Exception ex)
236236
```
237237
6. Start the `Northwind.MinimalApi` web service project using the `http` launch profile.
238238
7. Start the `Northwind.Mvc` website project using the `https` launch profile.
239-
8. Navigate to https://localhost:5151/ and note the todos, as shown in *Figure 15B.2*:
239+
8. Navigate to https://localhost:5141/ to see the MVC website and note the todos on the home page, as shown in *Figure 15B.2*:
240240
241241
![Todos on the home page of the Northwind website](assets/B19586_15B_02.png)
242242
*Figure 15B.2: Todos on the home page of the Northwind website*

0 commit comments

Comments
 (0)