mirror of
https://github.com/markjprice/cs11dotnet7.git
synced 2026-03-15 09:03:51 +01:00
Add item for page 453
This commit is contained in:
parent
e6775df762
commit
527517c884
|
|
@ -1,14 +1,11 @@
|
|||
**Improvements** (1 item)
|
||||
**Improvements** (2 items)
|
||||
|
||||
If you have suggestions for improvements, then please [raise an issue in this repository](https://github.com/markjprice/cs11dotnet7/issues) or email me at markjprice (at) gmail.com.
|
||||
|
||||
- [Print Book](#print-book)
|
||||
- [Page 153 - Writing a function that returns a value](#page-153---writing-a-function-that-returns-a-value)
|
||||
- [Bonus Content](#bonus-content)
|
||||
- [Page 153 - Writing a function that returns a value](#page-153---writing-a-function-that-returns-a-value)
|
||||
- [Page 453 - Scaffolding models using an existing database](#page-453---scaffolding-models-using-an-existing-database)
|
||||
|
||||
# Print Book
|
||||
|
||||
## Page 153 - Writing a function that returns a value
|
||||
# Page 153 - Writing a function that returns a value
|
||||
|
||||
At the end of this section there is a note box that explains that we could use the `C` format code to format the output as currency. If you are running on a computer in a culture that uses Euros then to show the Euro currency symbol you must enable UTF-8 encoding.
|
||||
|
||||
|
|
@ -18,6 +15,16 @@ Add the following statement near the top of the code file before doing any writi
|
|||
Console.OutputEncoding = System.Text.Encoding.UTF8;
|
||||
```
|
||||
|
||||
# Bonus Content
|
||||
# Page 453 - Scaffolding models using an existing database
|
||||
|
||||
None so far.
|
||||
In Step 2, I show text that must be entered as a single line at the command-line, as shown in the following command:
|
||||
```
|
||||
dotnet ef dbcontext scaffold "Filename=Northwind.db" Microsoft.
|
||||
EntityFrameworkCore.Sqlite --table Categories --table Products --output-
|
||||
dir AutoGenModels --namespace WorkingWithEFCore.AutoGen --data-
|
||||
annotations --context Northwind
|
||||
```
|
||||
|
||||
I recommend that you copy and paste long commands like this from the eBook into a plain text editor like Notepad, and then make sure that the whole command is properly formatted as a single line, before you then copy and paste it to the command-line.
|
||||
|
||||
Copying and pasting directly from the ebook is likely to include newline characters and missing spaces and so on that break the command.
|
||||
|
|
|
|||
Loading…
Reference in a new issue