Add missing "add connection" for SQL Server
Also cleanup package references and using statements. [#81]
This commit is contained in:
Родитель
3a286e2168
Коммит
76ed8f72bc
|
@ -46,7 +46,7 @@ parameters:
|
|||
- name: any-config-source
|
||||
expression: config-server || placeholder || random-value
|
||||
- name: any-connector
|
||||
expression: data-mongodb || mysql || oauth || postgresql || amqp || data-redis || sqlserver
|
||||
expression: data-mongodb || mysql || oauth || postgresql || amqp || data-redis
|
||||
- name: any-sql
|
||||
expression: mysql || postgresql || data-mongodb || sqlserver
|
||||
- name: any-efcore
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
<PackageReference Include="Steeltoe.Connector.EFCore" Version="{{SteeltoeVersion}}" />
|
||||
{{/any-efcore}}
|
||||
{{#sqlserver}}
|
||||
<PackageReference Include="Steeltoe.Connector.EFCore" Version="{{SteeltoeVersion}}" />
|
||||
<PackageReference Include="Steeltoe.Connector.ConnectorCore" Version="{{SteeltoeVersion}}"/>
|
||||
<PackageReference Include="System.Data.SqlClient" Version="{{sqlclient-version}}" />
|
||||
{{/sqlserver}}
|
||||
{{#eureka-client}}
|
||||
|
|
|
@ -28,7 +28,7 @@ using Steeltoe.Connector.RabbitMQ;
|
|||
using Steeltoe.Connector.Redis;
|
||||
{{/data-redis}}
|
||||
{{#sqlserver}}
|
||||
using Steeltoe.Connector.SqlServer.EFCore;
|
||||
using Steeltoe.Connector.SqlServer;
|
||||
{{/sqlserver}}
|
||||
{{#eureka-client}}
|
||||
using Steeltoe.Discovery.Client;
|
||||
|
@ -120,6 +120,9 @@ namespace {{Namespace}}
|
|||
{{#postgresql-efcore}}
|
||||
services.AddDbContext<TestContext>(options => options.UseNpgsql(Configuration));
|
||||
{{/postgresql-efcore}}
|
||||
{{#sqlserver}}
|
||||
services.AddSqlServerConnection(Configuration);
|
||||
{{/sqlserver}}
|
||||
services.AddControllers();
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ parameters:
|
|||
- name: any-config-source
|
||||
expression: config-server || placeholder || random-value
|
||||
- name: any-connector
|
||||
expression: data-mongodb || mysql || oauth || postgresql || amqp || data-redis || sqlserver
|
||||
expression: data-mongodb || mysql || oauth || postgresql || amqp || data-redis
|
||||
- name: any-sql
|
||||
expression: mysql || postgresql || data-mongodb || sqlserver
|
||||
- name: any-efcore
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
<PackageReference Include="Steeltoe.Connector.EFCore" Version="{{SteeltoeVersion}}" />
|
||||
{{/any-efcore}}
|
||||
{{#sqlserver}}
|
||||
<PackageReference Include="Steeltoe.Connector.EFCore" Version="{{SteeltoeVersion}}" />
|
||||
<PackageReference Include="Steeltoe.Connector.ConnectorCore" Version="{{SteeltoeVersion}}"/>
|
||||
<PackageReference Include="System.Data.SqlClient" Version="{{sqlclient-version}}" />
|
||||
{{/sqlserver}}
|
||||
{{#eureka-client}}
|
||||
|
|
|
@ -28,7 +28,7 @@ using Steeltoe.Connector.RabbitMQ;
|
|||
using Steeltoe.Connector.Redis;
|
||||
{{/data-redis}}
|
||||
{{#sqlserver}}
|
||||
using Steeltoe.Connector.SqlServer.EFCore;
|
||||
using Steeltoe.Connector.SqlServer;
|
||||
{{/sqlserver}}
|
||||
{{#eureka-client}}
|
||||
using Steeltoe.Discovery.Client;
|
||||
|
@ -120,6 +120,9 @@ namespace {{Namespace}}
|
|||
{{#postgresql-efcore}}
|
||||
services.AddDbContext<TestContext>(options => options.UseNpgsql(Configuration));
|
||||
{{/postgresql-efcore}}
|
||||
{{#sqlserver}}
|
||||
services.AddSqlServerConnection(Configuration);
|
||||
{{/sqlserver}}
|
||||
services.AddControllers();
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче