Skip to content

Commit 397c1a7

Browse files
authored
Updates (#45)
* update submodules * scaffold help refresh * update docfx for local builds * modern template tuning * split API documentation for each library, remove duplicate github link
1 parent 90096d5 commit 397c1a7

File tree

7 files changed

+155
-36
lines changed

7 files changed

+155
-36
lines changed

local.cmd

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
ECHO OFF
22
CLS
33

4+
dotnet tool update docfx -g
5+
46
powershell -Command .\build.ps1 -deploy $false

source/articles/cli-help.txt

+26-15
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
dotnet linq2db - Linq To DB command-line utilities. Version: 4.4.0.0
1+
dotnet linq2db - Linq To DB command-line utilities. Version: 5.2.1.0
22

33
Usage:
44
dotnet linq2db scaffold <options>
@@ -16,16 +16,16 @@ Options:
1616
JSON property type depends on option type: bool for boolean properties, integer number for numeric properties and string for other properties.
1717
If property could have multiple values, it should use array as property type.
1818
JSON file example:
19-
{
20-
"general": {
21-
"output": "c:\my\project\datamodel",
22-
"overwrite": true,
23-
"provider": "SQLServer",
24-
},
25-
"code": {
26-
"nrt": false
27-
}
28-
}
19+
{
20+
"general": {
21+
"output": "c:\my\project\datamodel",
22+
"overwrite": true,
23+
"provider": "SQLServer",
24+
},
25+
"code": {
26+
"nrt": false
27+
}
28+
}
2929

3030
-o, --output : relative or full path to folder to put generated files
3131
type: string (optional)
@@ -669,6 +669,16 @@ Options:
669669
default: false
670670
default (T4 mode): true
671671

672+
--metadata : specify type of generated metadata
673+
type: string (optional)
674+
json: dataModel.metadata
675+
default: attributes
676+
default (T4 mode): attributes
677+
supported values:
678+
none : don't emit metadata for model
679+
attributes : annotate model with mapping attributes
680+
fluent : annotate model using fluent mapping
681+
672682
--base-entity : base class for generated entities
673683
type: string (optional)
674684
json: dataModel.base-entity
@@ -737,15 +747,15 @@ Options:
737747
default: false
738748
default (T4 mode): true
739749

740-
Constructor example: public MyDataContext(LinqToDBConnectionOptions options) { ... }
750+
Constructor example: public MyDataContext(DataOptions options) { ... }
741751

742752
--add-typed-options-ctor : generate data context contructor with generic options parameter
743753
type: bool (optional)
744754
json: dataModel.add-typed-options-ctor
745755
default: true
746756
default (T4 mode): true
747757

748-
Constructor example: public MyDataContext(LinqToDBConnectionOptions<MyDataContext> options) { ... }
758+
Constructor example: public MyDataContext(DataOptions<MyDataContext> options) { ... }
749759

750760
--context-name : class name for generated data context
751761
type: string (optional)
@@ -854,9 +864,10 @@ Options:
854864
--find-methods : enable generation of extension methods to access entity by primary key
855865
type: string list (optional)
856866
json: dataModel.find-methods
857-
default: sync-pk-table, async-pk-table, query-pk-table, sync-pk-context, async-pk-context, query-pk-context, sync-entity-table, async-entity-table, query-entity-table, sync-entity-context, async-entity-context
858-
default (T4 mode): sync-pk-table, async-pk-table, query-pk-table, sync-pk-context, async-pk-context, query-pk-context, sync-entity-table, async-entity-table, query-entity-table, sync-entity-context
867+
default: sync-pk-table, async-pk-table
868+
default (T4 mode): sync-pk-table
859869
supported values:
870+
none : disable generation of Find extensions. Cannot be used with other values
860871
sync-pk-table : generate sync entity load extension on table object with primary key parameters: Entity? Find (this ITable<Entity> table, pk_fields)
861872
async-pk-table : generate sync entity load extension on table object with primary key parameters: Task<Entity?> FindAsync(this ITable<Entity> table, pk_fields, CancellationToken)
862873
query-pk-table : generate entity query extension on table object with primary key parameters : IQueryable<Entity> FindQuery(this ITable<Entity> table, pk_fields)

source/docfx.json

+94-16
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,105 @@
11
{
2+
//https://github.com/dotnet/docfx/tree/main/docs/docs
23
"metadata": [
4+
// specify path to non-test c# projects
5+
// XML documentation comments from those projects will be used
6+
// for API documentation generation
7+
{
8+
"src": [
9+
{
10+
"files": [
11+
"linq2db/Source/LinqToDB/LinqToDB.csproj"
12+
],
13+
"src": "../submodules"
14+
}
15+
],
16+
"dest": "api/linq2db",
17+
"filter": "filterConfig.yml"
18+
},
19+
{
20+
"src": [
21+
{
22+
"files": [
23+
"linq2db/Source/LinqToDB.AspNet/LinqToDB.AspNet.csproj"
24+
],
25+
"src": "../submodules"
26+
}
27+
],
28+
"dest": "api/linq2db.aspnet",
29+
"filter": "filterConfig.yml"
30+
},
31+
{
32+
"src": [
33+
{
34+
"files": [
35+
"linq2db/Source/LinqToDB.Remote.Grpc/LinqToDB.Remote.Grpc.csproj"
36+
],
37+
"src": "../submodules"
38+
}
39+
],
40+
"dest": "api/linq2db.remote.grpc",
41+
"filter": "filterConfig.yml"
42+
},
43+
{
44+
"src": [
45+
{
46+
"files": [
47+
"linq2db/Source/LinqToDB.Remote.Wcf/LinqToDB.Remote.Wcf.csproj"
48+
],
49+
"src": "../submodules"
50+
}
51+
],
52+
"dest": "api/linq2db.remote.wcf",
53+
"filter": "filterConfig.yml"
54+
},
55+
{
56+
"src": [
57+
{
58+
"files": [
59+
"linq2db/Source/LinqToDB.Tools/LinqToDB.Tools.csproj"
60+
],
61+
"src": "../submodules"
62+
}
63+
],
64+
"dest": "api/linq2db.tools",
65+
"filter": "filterConfig.yml"
66+
},
67+
{
68+
"src": [
69+
{
70+
"files": [
71+
"linq2db.EntityFrameworkCore/Source/LinqToDB.EntityFrameworkCore/linq2db.EntityFrameworkCore.csproj"
72+
],
73+
"src": "../submodules"
74+
}
75+
],
76+
"dest": "api/linq2db.efcore",
77+
"filter": "filterConfig.yml"
78+
},
379
{
4-
// specify path to non-test c# projects
5-
// XML documentation comments from those projects will be used
6-
// for API documentation generation
780
"src": [
881
{
982
"files": [
10-
"linq2db/Source/LinqToDB/LinqToDB.csproj",
11-
"linq2db/Source/LinqToDB.AspNet/LinqToDB.AspNet.csproj",
12-
"linq2db/Source/LinqToDB.Remote.Grpc/LinqToDB.Remote.Grpc.csproj",
13-
"linq2db/Source/LinqToDB.Remote.Wcf/LinqToDB.Remote.Wcf.csproj",
14-
"linq2db/Source/LinqToDB.Tools/LinqToDB.Tools.csproj",
15-
"linq2db.EntityFrameworkCore/Source/LinqToDB.EntityFrameworkCore/linq2db.EntityFrameworkCore.csproj",
1683
"LinqToDB.Identity/src/LinqToDB.Identity/LinqToDB.Identity.csproj"
1784
],
1885
"src": "../submodules"
1986
}
2087
],
21-
"dest": "./api",
88+
"dest": "api/linq2db.identity",
2289
"filter": "filterConfig.yml"
2390
}
2491
],
2592
"build": {
2693
"content": [
2794
{
2895
"files": [
29-
"api/**.yml",
96+
"api/linq2db/*.yml",
97+
"api/linq2db.tools/*.yml",
98+
"api/linq2db.aspnet/*.yml",
99+
"api/linq2db.efcore/*.yml",
100+
"api/linq2db.identity/*.yml",
101+
"api/linq2db.remote.grpc/*.yml",
102+
"api/linq2db.remote.wcf/*.yml",
30103
"articles/**/*.md",
31104
"articles/**/toc.yml",
32105
"toc.yml",
@@ -47,16 +120,21 @@
47120
"dest": "../_site",
48121
"globalMetadataFiles": [],
49122
"globalMetadata": {
50-
"_appTitle": "Linq To DB (aka linq2db)",
51-
"_appFooter": "Copyright © 2011-2023 linq2db.com<br><br>Generated by <strong>DocFX</strong>",
52-
"_enableSearch": true,
123+
//https://github.com/dotnet/docfx/blob/main/docs/docs/template.md#modern-template
124+
"_appTitle": "Linq To DB",
125+
"_appName": "Linq To DB",
126+
"_appFooter": "© 2011-2023 Linq To DB Team<br/>Generated by <strong><a href='https://github.com/dotnet/docfx' target='_blank'>DocFX</a></strong>",
53127
"_appLogoPath": "images/icon.png",
54-
"_appFaviconPath": "images/icon.ico"
128+
"_appFaviconPath": "images/icon.ico",
129+
"_enableSearch": true,
130+
"_disableNewTab": false,
131+
"_disableContribution": true
55132
},
56133
"fileMetadataFiles": [],
57134
"template": [
58135
"default",
59-
"modern"
136+
"modern",
137+
"templates/custom"
60138
],
61139
"postProcessors": [ "ExtractSearchIndex" ],
62140
"noLangKeyword": false,
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
export default {
2+
iconLinks: [
3+
{
4+
icon: 'github',
5+
href: 'https://github.com/linq2db/linq2db',
6+
title: 'Linq To DB'
7+
},
8+
{
9+
icon: 'twitter',
10+
href: 'https://twitter.com/linq2db',
11+
title: 'Releases Twitter Feed'
12+
}
13+
]
14+
}
15+

source/toc.yml

+16-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
- name: Articles
22
href: articles/
33
- name: API Documentation
4-
href: api/
5-
- name: Linq To DB GitHub
6-
href: https://github.com/linq2db
4+
dropdown: true
5+
items:
6+
- name: Linq To DB
7+
href: api/linq2db/
8+
- name: Linq To DB for ASP.NET Core
9+
href: api/linq2db.aspnet/
10+
- name: Linq To DB over GRPC
11+
href: api/linq2db.remote.grpc/
12+
- name: Linq To DB over WCF
13+
href: api/linq2db.remote.wcf/
14+
- name: Linq To DB Tools
15+
href: api/linq2db.tools/
16+
- name: Linq To DB for Entity Framework Core
17+
href: api/linq2db.efcore/
18+
- name: Linq To DB ASP.NET Identity Provider
19+
href: api/linq2db.identity/

submodules/linq2db

Submodule linq2db updated 142 files

0 commit comments

Comments
 (0)