Skip to content

Commit 9bbe970

Browse files
committed
update docs
1 parent 9809060 commit 9bbe970

13 files changed

Lines changed: 64 additions & 23 deletions

README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ Entity Framework Core Generator supports the following databases.
128128
- PostgreSQL
129129
- MySQL
130130
- Sqlite
131+
- Oracle
131132

132133
The provider can be set via command line or via the [configuration file](https://efg.loresoft.com/configuration/).
133134

@@ -147,14 +148,25 @@ database:
147148
148149
## Database Schema
149150
150-
The database schema is loaded from the metadata model factory implementation of `IDatabaseModelFactory`. Entity Framework Core Generator uses the implemented interface from each of the supported providers similar to how `ef dbcontext scaffold` works.
151+
The database schema is loaded from [SchemaSaurus](https://github.com/loresoft/SchemaSaurus) for each supported provider.
151152
152153
## View Models
153154
154155
Entity Framework Core Generator supports generating [Read](https://efg.loresoft.com/md/read/), [Create](https://efg.loresoft.com/md/create/) and [Update](https://efg.loresoft.com/md/update/) view models from an entity. Many projects rely on view models to shape data. The model templates can be used to quickly get the basic view models created. The model templates also support regeneration so any database change can easily be sync'd to the view models.
155156
156157
## Change Log
157158
159+
### Version 8.0
160+
161+
- add support for .NET 10 while continuing to target .NET 8
162+
- update generated Entity Framework dependencies for Entity Framework Core 10
163+
- load database schema metadata from [SchemaSaurus](https://github.com/loresoft/SchemaSaurus) instead of Entity Framework Core Design
164+
- remove direct Entity Framework Core dependencies from the tool; Entity Framework Core packages are only needed by generated projects
165+
- add Oracle database provider support
166+
- add entity `typeMapping` configuration for mapping native database types to generated .NET types
167+
- update major package dependencies including AutoMapper 16, FluentValidation 12, Spectre.Console.Cli 0.55 and YamlDotNet 18
168+
- generated projects may need matching current Entity Framework Core and provider package versions
169+
158170
### Version 7.0
159171

160172
- support for .net 9
@@ -181,7 +193,7 @@ database:
181193

182194
- upgrade to .net 8
183195
- add option to turn off temporal table mapping
184-
- add rowversion options, ByteArray|Long|ULong
196+
- add rowversion options, ByteArray|Long|ULong
185197
- add script template merge
186198

187199
### Version 5.0

docs/configuration.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ database:
2828
# the connection string to the database
2929
connectionString: 'Data Source=(local);Initial Catalog=Tracker;Integrated Security=True'
3030
# the database provider name. Default: SqlServer
31-
provider: SqlServer|PostgreSQL|MySQL|Sqlite
31+
provider: SqlServer|PostgreSQL|MySQL|Sqlite|Oracle
3232

3333
# config name to read the connection string from the user secrets file
3434
connectionName: 'ConnectionStrings:Generator'
@@ -46,7 +46,7 @@ database:
4646
schemas:
4747
- dbo
4848

49-
# exclude tables or columns: Changed in v7.x
49+
# exclude tables or columns
5050
exclude:
5151
# list of expressions for tables to exclude, source is Schema.TableName
5252
tables:
@@ -95,6 +95,14 @@ data:
9595
mappingAttributes: true
9696
# Generate class names with prefixed schema name eg. dbo.MyTable = DboMyTable
9797
prefixWithSchemaName: false
98+
99+
# Map native database type names to generated .NET system type names
100+
typeMapping:
101+
- nativeType: geometry
102+
systemType: NetTopologySuite.Geometries.Geometry
103+
- nativeType: dbo.StringList
104+
systemType: List<string?>
105+
98106
# file header
99107
header: // Entity header
100108

docs/connectionString.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ The `userSecretsId` can be shared with your .NET Core Project.
5151

5252
Read more about user secrets in the ASP.NET Core documentation
5353

54-
[Secret Manager](https://docs.microsoft.com/en-us/aspnet/core/security/app-secrets?tabs=windows&view=aspnetcore-2.1#secret-manager)
54+
[Secret Manager](https://learn.microsoft.com/aspnet/core/security/app-secrets#secret-manager)

docs/ef/dataContext.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,4 @@ Property rename is supported. The rename will be discovered during the parsing
107107

108108
### Generated Configuration
109109

110-
The `Generated Configuration` region configures the entity type mapping.
110+
The `Generated Configuration` region configures the entity type mapping.

docs/ef/extensions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,4 @@ The query extension template has one region that is replaced on regeneration.
9090

9191
### Generated Configuration
9292

93-
The `Generated Configure` region configures the entity type mapping.
93+
The `Generated Configure` region configures the entity type mapping.

docs/ef/mapping.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,11 @@ Include XML documentation for the generated class. Default: `false`
136136

137137
### temporal
138138

139-
If temporal table mapping is enabled. Default true
139+
If temporal table mapping is enabled. Default `true`
140140

141141
### rowVersion
142142

143-
How row versions should be mapped. Default ByteArray. ByteArray|Long|ULong
143+
How row versions should be mapped. Default ByteArray. `ByteArray|Long|ULong`
144144

145145
## Regeneration
146146

docs/index.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ The Entity Framework Core Generator tool is available on nuget.org via package n
88

99
To install EntityFrameworkCore.Generator, run the following command in the console
1010

11-
dotnet tool install --global EntityFrameworkCore.Generator
11+
```Shell
12+
dotnet tool install --global EntityFrameworkCore.Generator
13+
```
1214

1315
More information about NuGet package available at
1416
<https://nuget.org/packages/EntityFrameworkCore.Generator>
@@ -25,4 +27,6 @@ More information about NuGet package available at
2527

2628
To generate source code files from your database, use the generate command with your connection string.
2729

28-
efg generate -c <ConnectionString>
30+
```Shell
31+
efg generate -c <ConnectionString>
32+
```

docs/md/mapper.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@ Include XML documentation for the generated mapper class. Default: `false`
6161

6262
## Regeneration
6363

64-
The mapper template does not support regeneration. The mapper class will only be created if one doesn't exist for an entity.
64+
The mapper template does not support regeneration. The mapper class will only be created if one doesn't exist for an entity.

docs/md/shared.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Shared Model Template
1+
# Shared Model Template
22

33
The [Read](read.md), [Create](create.md) and [Update](update.md) model templates share the following [configuration](../configuration.md).
44

@@ -39,4 +39,3 @@ Exclude all entities that match any of the listed regular expressions.
3939
#### properties
4040
4141
Exclude all properties that match any of the listed regular expressions. The value to match contains the parent entity the property belongs too, `Entity.Property`.
42-

docs/md/validation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,4 @@ The validation template has one region that is replaced on regeneration.
6767

6868
### Generated Constructor
6969

70-
The `Generated Constructor` region initializes any model rules that can be derived from the database context.
70+
The `Generated Constructor` region initializes any model rules that can be derived from the database context.

0 commit comments

Comments
 (0)