mirror of
https://github.com/markjprice/cs11dotnet7.git
synced 2025-12-06 05:32:03 +01:00
Update improvements.md
This commit is contained in:
parent
c3cedb71f2
commit
af1d5e42b7
|
|
@ -134,18 +134,14 @@ In the next edition, I will add a section with a table summarizing the file type
|
|||
|
||||
|Technology|Special filename|File extension|Directive|
|
||||
|---|---|---|---|
|
||||
|Razor View (for MVC)||`.cshtml`|None|
|
||||
|Razor Page||`.cshtml`|`@page`|
|
||||
|Razor Component (for Blazor)||`.razor`|None|
|
||||
|Razor Component (for Blazor with page routing)||`.razor`|`@page`|
|
||||
|Razor Page||`.cshtml`|`@page`|
|
||||
|Razor View (for MVC)||`.cshtml`|None|
|
||||
|Razor Layout||`.cshtml`|None|
|
||||
|Razor View Start|`_ViewStart`|`.cshtml`|None|
|
||||
|Razor View Imports|`_ViewImports`|`.cshtml`|None|
|
||||
|
||||
> **Warning!** Be careful to use the correct file extension and directive at the top of the file or you will get unexpected behavior.
|
||||
|
||||

|
||||
|
||||
A **Razor Layout** file like `_MyCustomLayout.cshtml` is identical to a **Razor View**. What makes it a layout is being set as the `Layout` property of another Razor file, as shown in the following code:
|
||||
```cs
|
||||
@{
|
||||
|
|
@ -153,6 +149,10 @@ A **Razor Layout** file like `_MyCustomLayout.cshtml` is identical to a **Razor
|
|||
}
|
||||
```
|
||||
|
||||
> **Warning!** Be careful to use the correct file extension and directive at the top of the file or you will get unexpected behavior.
|
||||
|
||||

|
||||
|
||||
# Page 547 - Creating a class library for a Northwind database context
|
||||
|
||||
In Step 8, you write code to implement the `OnConfiguring` method so that it sets the Filename path to the SQLite database file correctly when running in both Visual Studio 2022 and at the command-line with Visual Studio Code, as shown in the following code:
|
||||
|
|
|
|||
Loading…
Reference in a new issue