Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
CAP
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
CAP
Commits
5583f6af
Commit
5583f6af
authored
Jul 17, 2017
by
yangxiaodong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update options configuration.
parent
9acccdae
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
16 deletions
+6
-16
CAP.EFOptions.cs
src/DotNetCore.CAP.EntityFrameworkCore/CAP.EFOptions.cs
+2
-12
CAP.Options.Extensions.cs
...NetCore.CAP.EntityFrameworkCore/CAP.Options.Extensions.cs
+1
-0
SqlServerStorageConnection.cs
...ore.CAP.EntityFrameworkCore/SqlServerStorageConnection.cs
+2
-3
RabbitMQConsumerClient.cs
src/DotNetCore.CAP.RabbitMQ/RabbitMQConsumerClient.cs
+1
-1
No files found.
src/DotNetCore.CAP.EntityFrameworkCore/CAP.EFOptions.cs
View file @
5583f6af
...
@@ -5,8 +5,7 @@ namespace DotNetCore.CAP
...
@@ -5,8 +5,7 @@ namespace DotNetCore.CAP
{
{
public
class
EFOptions
public
class
EFOptions
{
{
public
const
string
DefaultSchema
=
"cap"
;
public
const
string
DefaultSchema
=
"Cap"
;
public
const
string
DefaultMigrationsHistoryTableName
=
"__EFMigrationsHistory"
;
/// <summary>
/// <summary>
/// Gets or sets the schema to use when creating database objects.
/// Gets or sets the schema to use when creating database objects.
...
@@ -15,17 +14,8 @@ namespace DotNetCore.CAP
...
@@ -15,17 +14,8 @@ namespace DotNetCore.CAP
public
string
Schema
{
get
;
set
;
}
=
DefaultSchema
;
public
string
Schema
{
get
;
set
;
}
=
DefaultSchema
;
/// <summary>
/// <summary>
/// Gets or sets the migrations history table's schema.
/// EF dbcontext type.
/// If this is null, <see cref="Schema"/> will be used.
/// </summary>
/// </summary>
public
string
MigrationsHistoryTableSchema
{
get
;
set
;
}
/// <summary>
/// Gets or sets the migrations history table's name.
/// Default is <see cref="DefaultMigrationsHistoryTableName"/>.
/// </summary>
public
string
MigrationsHistoryTableName
{
get
;
set
;
}
=
DefaultMigrationsHistoryTableName
;
public
Type
DbContextType
{
get
;
internal
set
;
}
public
Type
DbContextType
{
get
;
internal
set
;
}
}
}
}
}
\ No newline at end of file
src/DotNetCore.CAP.EntityFrameworkCore/CAP.Options.Extensions.cs
View file @
5583f6af
...
@@ -40,6 +40,7 @@ namespace Microsoft.Extensions.DependencyInjection
...
@@ -40,6 +40,7 @@ namespace Microsoft.Extensions.DependencyInjection
var
efOptions
=
new
EFOptions
{
DbContextType
=
typeof
(
TContext
)
};
var
efOptions
=
new
EFOptions
{
DbContextType
=
typeof
(
TContext
)
};
configure
(
efOptions
);
configure
(
efOptions
);
options
.
RegisterExtension
(
new
SqlServerCapOptionsExtension
(
configure
));
options
.
RegisterExtension
(
new
SqlServerCapOptionsExtension
(
configure
));
return
options
;
return
options
;
...
...
src/DotNetCore.CAP.EntityFrameworkCore/SqlServerStorageConnection.cs
View file @
5583f6af
...
@@ -6,7 +6,6 @@ using Dapper;
...
@@ -6,7 +6,6 @@ using Dapper;
using
DotNetCore.CAP.Infrastructure
;
using
DotNetCore.CAP.Infrastructure
;
using
DotNetCore.CAP.Models
;
using
DotNetCore.CAP.Models
;
using
Microsoft.EntityFrameworkCore
;
using
Microsoft.EntityFrameworkCore
;
using
Microsoft.Extensions.Options
;
namespace
DotNetCore.CAP.EntityFrameworkCore
namespace
DotNetCore.CAP.EntityFrameworkCore
{
{
...
@@ -14,9 +13,9 @@ namespace DotNetCore.CAP.EntityFrameworkCore
...
@@ -14,9 +13,9 @@ namespace DotNetCore.CAP.EntityFrameworkCore
{
{
private
readonly
SqlServerOptions
_options
;
private
readonly
SqlServerOptions
_options
;
public
SqlServerStorageConnection
(
IOptions
<
SqlServerOptions
>
options
)
public
SqlServerStorageConnection
(
SqlServerOptions
options
)
{
{
_options
=
options
.
Value
;
_options
=
options
;
}
}
public
SqlServerOptions
Options
=>
_options
;
public
SqlServerOptions
Options
=>
_options
;
...
...
src/DotNetCore.CAP.RabbitMQ/RabbitMQConsumerClient.cs
View file @
5583f6af
...
@@ -46,7 +46,7 @@ namespace DotNetCore.CAP.RabbitMQ
...
@@ -46,7 +46,7 @@ namespace DotNetCore.CAP.RabbitMQ
_connection
=
_connectionFactory
.
CreateConnection
();
_connection
=
_connectionFactory
.
CreateConnection
();
_channel
=
_connection
.
CreateModel
();
_channel
=
_connection
.
CreateModel
();
_channel
.
ExchangeDeclare
(
exchange
:
_exchageName
,
type
:
_r
abbitMQOptions
.
ExchangeType
);
_channel
.
ExchangeDeclare
(
exchange
:
_exchageName
,
type
:
R
abbitMQOptions
.
ExchangeType
);
_channel
.
QueueDeclare
(
_queueName
,
exclusive
:
false
);
_channel
.
QueueDeclare
(
_queueName
,
exclusive
:
false
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment