Skip to content

Commit f30044e

Browse files
committed
feat:迁移Npg EF Core 适配.NET 8.0版本
1 parent 13945c9 commit f30044e

File tree

244 files changed

+50213
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

244 files changed

+50213
-2
lines changed

.build/server.crt

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
Certificate:
2+
Data:
3+
Version: 3 (0x2)
4+
Serial Number: 12599801177921850358 (0xaedb7c6a2a948bf6)
5+
Signature Algorithm: sha1WithRSAEncryption
6+
Issuer: C=AU, ST=Some-State, O=Internet Widgits Pty Ltd, CN=localhost
7+
Validity
8+
Not Before: Mar 13 11:19:37 2015 GMT
9+
Not After : Apr 12 11:19:37 2015 GMT
10+
Subject: C=AU, ST=Some-State, O=Internet Widgits Pty Ltd, CN=localhost
11+
Subject Public Key Info:
12+
Public Key Algorithm: rsaEncryption
13+
Public-Key: (1024 bit)
14+
Modulus:
15+
00:c1:df:3f:3b:b8:59:b1:33:ae:9c:ec:6b:44:41:
16+
7b:0a:cd:51:62:98:e2:11:f0:a0:7d:65:67:9b:49:
17+
88:15:91:cf:30:f1:23:dc:3c:00:83:76:be:59:df:
18+
9c:66:8f:eb:f3:a7:73:a0:eb:2a:26:85:d2:48:aa:
19+
4f:88:1b:b8:31:22:df:bd:e3:1b:6f:4f:70:c3:b2:
20+
f4:a8:14:07:0e:77:d7:fe:91:b1:b1:3d:0a:cc:5e:
21+
32:ac:31:06:d3:d7:cf:e5:fc:3c:c0:db:c0:6b:0e:
22+
00:e0:a5:32:4a:2d:90:63:37:7e:c8:e6:5d:ad:df:
23+
30:81:7e:65:4a:6d:71:a5:9b
24+
Exponent: 65537 (0x10001)
25+
X509v3 extensions:
26+
X509v3 Subject Key Identifier:
27+
17:4C:64:08:33:71:2A:34:33:CA:15:3E:F3:B8:98:1A:E7:8E:64:F4
28+
X509v3 Authority Key Identifier:
29+
keyid:17:4C:64:08:33:71:2A:34:33:CA:15:3E:F3:B8:98:1A:E7:8E:64:F4
30+
31+
X509v3 Basic Constraints:
32+
CA:TRUE
33+
Signature Algorithm: sha1WithRSAEncryption
34+
81:f4:69:3e:b1:c0:9f:4b:82:10:8d:3e:7c:98:70:2a:f3:24:
35+
ca:33:13:35:1d:9e:84:dc:b4:f1:17:1f:e6:18:d5:86:51:b3:
36+
ce:3e:4a:97:39:cc:7e:74:94:01:da:68:43:df:b0:b6:fc:29:
37+
0c:86:ce:5f:0c:3d:c6:f0:8c:c0:f5:86:e7:0b:3f:fb:b0:d6:
38+
b0:2c:9a:9e:15:be:31:dc:6d:bb:32:92:b7:36:fb:65:5a:f1:
39+
d2:44:04:fe:eb:97:f2:8a:31:2e:4c:fd:f9:80:00:8d:91:81:
40+
c1:90:97:18:fa:e2:c6:1c:ff:28:d1:58:94:b3:b5:9f:7a:f7:
41+
39:b3
42+
-----BEGIN CERTIFICATE-----
43+
MIICgDCCAemgAwIBAgIJAK7bfGoqlIv2MA0GCSqGSIb3DQEBBQUAMFkxCzAJBgNV
44+
BAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBX
45+
aWRnaXRzIFB0eSBMdGQxEjAQBgNVBAMMCWxvY2FsaG9zdDAeFw0xNTAzMTMxMTE5
46+
MzdaFw0xNTA0MTIxMTE5MzdaMFkxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21l
47+
LVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQxEjAQBgNV
48+
BAMMCWxvY2FsaG9zdDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAwd8/O7hZ
49+
sTOunOxrREF7Cs1RYpjiEfCgfWVnm0mIFZHPMPEj3DwAg3a+Wd+cZo/r86dzoOsq
50+
JoXSSKpPiBu4MSLfveMbb09ww7L0qBQHDnfX/pGxsT0KzF4yrDEG09fP5fw8wNvA
51+
aw4A4KUySi2QYzd+yOZdrd8wgX5lSm1xpZsCAwEAAaNQME4wHQYDVR0OBBYEFBdM
52+
ZAgzcSo0M8oVPvO4mBrnjmT0MB8GA1UdIwQYMBaAFBdMZAgzcSo0M8oVPvO4mBrn
53+
jmT0MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAgfRpPrHAn0uCEI0+
54+
fJhwKvMkyjMTNR2ehNy08Rcf5hjVhlGzzj5KlznMfnSUAdpoQ9+wtvwpDIbOXww9
55+
xvCMwPWG5ws/+7DWsCyanhW+MdxtuzKStzb7ZVrx0kQE/uuX8ooxLkz9+YAAjZGB
56+
wZCXGPrixhz/KNFYlLO1n3r3ObM=
57+
-----END CERTIFICATE-----

.build/server.key

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
-----BEGIN RSA PRIVATE KEY-----
2+
MIICXgIBAAKBgQDB3z87uFmxM66c7GtEQXsKzVFimOIR8KB9ZWebSYgVkc8w8SPc
3+
PACDdr5Z35xmj+vzp3Og6yomhdJIqk+IG7gxIt+94xtvT3DDsvSoFAcOd9f+kbGx
4+
PQrMXjKsMQbT18/l/DzA28BrDgDgpTJKLZBjN37I5l2t3zCBfmVKbXGlmwIDAQAB
5+
AoGBAJnspubCcivXzb33kx7JImisJP60RWFa/AEzPrQzCGGft7Gy8vbLiNjXsT/n
6+
4uQnRn3YKFzN+VRGkXNyDN0SrQSrRrFST56aLBhqe4BEO3l6JQJQ6h1y5aW7/R+y
7+
ehV9HIQd+RFgcyejStXJnXYC7lPycOjT4SGG/7mOZkOIbRmJAkEA8NwHvvxsLW77
8+
UwVto7us0oR0Ey8/vCgbEruZTdr+rVeOKKUvM4K1r4hMunXc2kJ+hhYYMoF2wfIv
9+
gpPq1F+GLQJBAM4PFV8pL+fLqQqoRh/2dGDBKQU5wlQS+A4sTAPTdy3V1zx3BE8s
10+
KJeYIk2Z72HqNLAL/LUC/gwKwuVg+3k0v+cCQQC2HZhZxyDAZabwSi1xXMk6z924
11+
V8R4L1bxHhm3bXudc5NQlj2PVCiuFX/2iIG6IgbqubAIGC3ETauwrskjVSrtAkEA
12+
gltgddcki0t4IVnbIxVTAnKwdLHZkj591tmHLVR2LPT/OS1B+KRC+cQwz0729cao
13+
lka/E/RUq2GTcnEsJb2NOQJAOHwXsZJj+qrMQmHmmej6X2Rro4bX7cJmyK99mAtC
14+
LigiSdiY/uDqJ/p+cHPH9g2RLWeFetUAZID94uNRk1peAg==
15+
-----END RSA PRIVATE KEY-----

.editorconfig

Lines changed: 255 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,255 @@
1+
# Schema: http://EditorConfig.org
2+
# Docs: https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference
3+
4+
# top-most EditorConfig file
5+
root = true
6+
7+
# Don't use tabs for indentation.
8+
[*]
9+
indent_style = space
10+
trim_trailing_whitespace = true
11+
guidelines = 140
12+
max_line_length = 140
13+
14+
# Code files
15+
[*.{cs,csx,vb,vbx}]
16+
indent_size = 4
17+
insert_final_newline = true
18+
#charset = utf-8-bom
19+
20+
# Xml project files
21+
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
22+
indent_size = 2
23+
24+
# Xml config files
25+
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct,xml,stylecop}]
26+
indent_size = 2
27+
28+
# JSON files
29+
[*.json]
30+
indent_size = 2
31+
32+
# Powershell files
33+
[*.ps1]
34+
indent_size = 2
35+
36+
# Shell scripts
37+
[*.sh]
38+
end_of_line = lf
39+
indent_size = 2
40+
41+
[*.{cmd,bat}]
42+
end_of_line = crlf
43+
indent_size = 2
44+
45+
## Language conventions
46+
# Dotnet code style settings:
47+
[*.{cs,vb}]
48+
# "This." and "Me." qualifiers
49+
dotnet_style_qualification_for_field = false:suggestion
50+
dotnet_style_qualification_for_property = false:suggestion
51+
dotnet_style_qualification_for_method = false:suggestion
52+
dotnet_style_qualification_for_event = false:suggestion
53+
54+
# Language keywords instead of framework type names for type references
55+
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
56+
dotnet_style_predefined_type_for_member_access = true:suggestion
57+
58+
# Modifier preferences
59+
dotnet_style_require_accessibility_modifiers = always:suggestion
60+
dotnet_style_readonly_field = true:warning
61+
62+
# Parentheses preferences
63+
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
64+
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
65+
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
66+
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
67+
68+
# Expression-level preferences
69+
dotnet_style_object_initializer = true:suggestion
70+
dotnet_style_collection_initializer = true:suggestion
71+
dotnet_style_explicit_tuple_names = true:suggestion
72+
dotnet_style_prefer_inferred_tuple_names = true:suggestion
73+
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
74+
dotnet_style_prefer_auto_properties = true:silent
75+
dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion
76+
dotnet_style_prefer_conditional_expression_over_return = true:suggestion
77+
78+
# Null-checking preferences
79+
dotnet_style_coalesce_expression = true:suggestion
80+
dotnet_style_null_propagation = true:suggestion
81+
82+
# CSharp code style settings:
83+
[*.cs]
84+
# Modifier preferences
85+
csharp_preferred_modifier_order = public,private,protected,internal,const,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion
86+
87+
# Implicit and explicit types
88+
csharp_style_var_for_built_in_types = true:suggestion
89+
csharp_style_var_when_type_is_apparent = true:suggestion
90+
csharp_style_var_elsewhere = true:suggestion
91+
92+
# Expression-bodied members
93+
# Explicitly disabled due to difference in coding style between source and tests
94+
#csharp_style_expression_bodied_methods = false:silent
95+
#csharp_style_expression_bodied_constructors = false:silent
96+
csharp_style_expression_bodied_operators = false:silent
97+
csharp_style_expression_bodied_properties = true:suggestion
98+
csharp_style_expression_bodied_indexers = true:suggestion
99+
csharp_style_expression_bodied_accessors = true:suggestion
100+
101+
# Pattern matching
102+
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
103+
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
104+
105+
# Inlined variable declarations
106+
csharp_style_inlined_variable_declaration = true:suggestion
107+
108+
# Expression-level preferences
109+
csharp_prefer_simple_default_expression = true:suggestion
110+
csharp_style_deconstructed_variable_declaration = true:suggestion
111+
csharp_style_pattern_local_over_anonymous_function = true:suggestion
112+
113+
# Null-checking preference
114+
csharp_style_throw_expression = true:suggestion
115+
csharp_style_conditional_delegate_call = true:suggestion
116+
117+
# Code block preferences
118+
csharp_prefer_braces = true:suggestion
119+
120+
## Formatting conventions
121+
# Dotnet formatting settings:
122+
[*.{cs,vb}]
123+
# Organize usings
124+
dotnet_sort_system_directives_first = true
125+
dotnet_separate_import_directive_groups = false
126+
127+
# CSharp formatting settings:
128+
[*.cs]
129+
# Newline options
130+
csharp_new_line_before_open_brace = all
131+
csharp_new_line_before_else = true
132+
csharp_new_line_before_catch = true
133+
csharp_new_line_before_finally = true
134+
csharp_new_line_before_members_in_object_initializers = true
135+
csharp_new_line_before_members_in_anonymous_types = true
136+
csharp_new_line_between_query_expression_clauses = true
137+
138+
# Identation options
139+
csharp_indent_block_contents = true
140+
csharp_indent_braces = false
141+
csharp_indent_case_contents_when_block = false
142+
csharp_indent_switch_labels = true
143+
csharp_indent_case_contents = true
144+
csharp_indent_labels = no_change
145+
146+
# Spacing options
147+
csharp_space_after_cast = false
148+
csharp_space_after_keywords_in_control_flow_statements = true
149+
csharp_space_between_method_declaration_parameter_list_parentheses = false
150+
csharp_space_between_method_call_parameter_list_parentheses = false
151+
csharp_space_between_parentheses = false
152+
csharp_space_before_colon_in_inheritance_clause = true
153+
csharp_space_after_colon_in_inheritance_clause = true
154+
csharp_space_around_binary_operators = before_and_after
155+
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
156+
csharp_space_between_method_call_name_and_opening_parenthesis = false
157+
csharp_space_between_method_call_empty_parameter_list_parentheses = false
158+
csharp_space_after_comma = true
159+
csharp_space_after_dot = false
160+
csharp_space_after_semicolon_in_for_statement = true
161+
csharp_space_around_declaration_statements = do_not_ignore
162+
csharp_space_before_comma = false
163+
csharp_space_before_dot = false
164+
csharp_space_before_open_square_brackets = false
165+
csharp_space_before_semicolon_in_for_statement = false
166+
csharp_space_between_empty_square_brackets = false
167+
csharp_space_between_method_declaration_name_and_open_parenthesis = false
168+
csharp_space_between_square_brackets = false
169+
170+
# Wrap options
171+
csharp_preserve_single_line_statements = true
172+
csharp_preserve_single_line_blocks = true
173+
174+
## Naming conventions
175+
[*.{cs,vb}]
176+
177+
## Naming styles
178+
179+
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
180+
dotnet_naming_style.camel_case_style.capitalization = camel_case
181+
182+
# PascalCase with I prefix
183+
dotnet_naming_style.interface_style.capitalization = pascal_case
184+
dotnet_naming_style.interface_style.required_prefix = I
185+
186+
# PascalCase with T prefix
187+
dotnet_naming_style.type_parameter_style.capitalization = pascal_case
188+
dotnet_naming_style.type_parameter_style.required_prefix = T
189+
190+
# camelCase with _ prefix
191+
dotnet_naming_style._camelCase.capitalization = camel_case
192+
dotnet_naming_style._camelCase.required_prefix = _
193+
194+
## Rules
195+
# Interfaces
196+
dotnet_naming_symbols.interface_symbol.applicable_kinds = interface
197+
dotnet_naming_symbols.interface_symbol.applicable_accessibilities = *
198+
dotnet_naming_rule.interface_naming.symbols = interface_symbol
199+
dotnet_naming_rule.interface_naming.style = interface_style
200+
dotnet_naming_rule.interface_naming.severity = suggestion
201+
202+
# Classes, Structs, Enums, Properties, Methods, Local Functions, Events, Namespaces
203+
dotnet_naming_symbols.class_symbol.applicable_kinds = class, struct, enum, property, method, local_function, event, namespace, delegate
204+
dotnet_naming_symbols.class_symbol.applicable_accessibilities = *
205+
206+
dotnet_naming_rule.class_naming.symbols = class_symbol
207+
dotnet_naming_rule.class_naming.style = pascal_case_style
208+
dotnet_naming_rule.class_naming.severity = suggestion
209+
210+
# Type Parameters
211+
dotnet_naming_symbols.type_parameter_symbol.applicable_kinds = type_parameter
212+
dotnet_naming_symbols.type_parameter_symbol.applicable_accessibilities = *
213+
214+
dotnet_naming_rule.type_parameter_naming.symbols = type_parameter_symbol
215+
dotnet_naming_rule.type_parameter_naming.style = type_parameter_style
216+
dotnet_naming_rule.type_parameter_naming.severity = suggestion
217+
218+
# Visible Fields
219+
dotnet_naming_symbols.public_field_symbol.applicable_kinds = field
220+
dotnet_naming_symbols.public_field_symbol.applicable_accessibilities = public, internal, protected, protected_internal, private_protected
221+
222+
dotnet_naming_rule.public_field_naming.symbols = public_field_symbol
223+
dotnet_naming_rule.public_field_naming.style = pascal_case_style
224+
dotnet_naming_rule.public_field_naming.severity = suggestion
225+
226+
# Private constant Fields
227+
dotnet_naming_symbols.const_field_symbol.applicable_kinds = field
228+
dotnet_naming_symbols.const_field_symbol.applicable_accessibilities = private
229+
dotnet_naming_symbols.const_field_symbol.required_modifiers = const
230+
231+
dotnet_naming_rule.const_field_naming.symbols = const_field_symbol
232+
dotnet_naming_rule.const_field_naming.style = pascal_case_style
233+
dotnet_naming_rule.const_field_naming.severity = suggestion
234+
235+
# Parameters
236+
dotnet_naming_symbols.parameter_symbol.applicable_kinds = parameter
237+
dotnet_naming_symbols.parameter_symbol.applicable_accessibilities = *
238+
239+
dotnet_naming_rule.parameter_naming.symbols = parameter_symbol
240+
dotnet_naming_rule.parameter_naming.style = camel_case_style
241+
dotnet_naming_rule.parameter_naming.severity = suggestion
242+
243+
# Everything Local
244+
dotnet_naming_symbols.everything_else.applicable_kinds = local
245+
dotnet_naming_symbols.everything_else.applicable_accessibilities = *
246+
247+
dotnet_naming_rule.everything_else_naming.symbols = everything_else
248+
dotnet_naming_rule.everything_else_naming.style = camel_case_style
249+
dotnet_naming_rule.everything_else_naming.severity = suggestion
250+
251+
# Microsoft .NET properties
252+
csharp_style_expression_bodied_methods = true:suggestion
253+
254+
# ReSharper properties
255+
resharper_local_function_body = expression_body

Directory.Build.props

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<Project>
2+
<PropertyGroup>
3+
<VersionPrefix>8.0.0</VersionPrefix>
4+
<LangVersion>preview</LangVersion>
5+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
6+
<AnalysisLevel>latest</AnalysisLevel>
7+
<NoWarn>NU5105</NoWarn>
8+
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
9+
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)Npgsql.snk</AssemblyOriginatorKeyFile>
10+
<SignAssembly>true</SignAssembly>
11+
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
12+
<ImplicitUsings>true</ImplicitUsings>
13+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
14+
15+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
16+
<PackageLicenseExpression>PostgreSQL</PackageLicenseExpression>
17+
<PackageProjectUrl>https://github.com/dotnetcore/EntityFrameworkCore.GaussDB</PackageProjectUrl>
18+
</PropertyGroup>
19+
20+
<ItemGroup>
21+
<Using Include="System.Diagnostics" />
22+
<Using Include="System.Linq.Expressions" />
23+
<Using Include="System.Reflection" />
24+
<Using Include="Microsoft.EntityFrameworkCore" />
25+
<Using Include="Microsoft.EntityFrameworkCore.ChangeTracking" />
26+
<Using Include="Microsoft.EntityFrameworkCore.Diagnostics" />
27+
<Using Include="Microsoft.EntityFrameworkCore.Design" />
28+
<Using Include="Microsoft.EntityFrameworkCore.Metadata.Builders" />
29+
<Using Include="Microsoft.EntityFrameworkCore.Infrastructure" />
30+
<Using Include="Microsoft.EntityFrameworkCore.Metadata" />
31+
<Using Include="Microsoft.EntityFrameworkCore.Metadata.Conventions" />
32+
<Using Include="Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure" />
33+
<Using Include="Microsoft.EntityFrameworkCore.Migrations" />
34+
<Using Include="Microsoft.EntityFrameworkCore.Migrations.Operations" />
35+
<Using Include="Microsoft.EntityFrameworkCore.Query" />
36+
<Using Include="Microsoft.EntityFrameworkCore.Query.SqlExpressions" />
37+
<Using Include="Microsoft.EntityFrameworkCore.Scaffolding" />
38+
<Using Include="Microsoft.EntityFrameworkCore.Scaffolding.Metadata" />
39+
<Using Include="Microsoft.EntityFrameworkCore.Storage" />
40+
<Using Include="Microsoft.EntityFrameworkCore.Storage.ValueConversion" />
41+
<Using Include="Microsoft.EntityFrameworkCore.Update" />
42+
<Using Include="Microsoft.EntityFrameworkCore.ValueGeneration" />
43+
<Using Include="Microsoft.EntityFrameworkCore.Utilities" />
44+
<Using Include="Microsoft.Extensions.Logging" />
45+
<Using Include="Microsoft.Extensions.DependencyInjection" />
46+
<Using Include="GaussDB" />
47+
<Using Include="GaussDBTypes" />
48+
</ItemGroup>
49+
50+
</Project>

0 commit comments

Comments
 (0)