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
0ad6a92e
Commit
0ad6a92e
authored
Oct 20, 2017
by
Savorboard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed callback topic send error bug.
parent
c21f9705
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
CapPublisher.cs
src/DotNetCore.CAP.MySql/CapPublisher.cs
+2
-2
CapPublisher.cs
src/DotNetCore.CAP.PostgreSql/CapPublisher.cs
+3
-3
CapPublisher.cs
src/DotNetCore.CAP.SqlServer/CapPublisher.cs
+4
-4
No files found.
src/DotNetCore.CAP.MySql/CapPublisher.cs
View file @
0ad6a92e
...
@@ -30,11 +30,11 @@ namespace DotNetCore.CAP.MySql
...
@@ -30,11 +30,11 @@ namespace DotNetCore.CAP.MySql
_dbContext
=
(
DbContext
)
ServiceProvider
.
GetService
(
_options
.
DbContextType
);
_dbContext
=
(
DbContext
)
ServiceProvider
.
GetService
(
_options
.
DbContextType
);
}
}
public
Task
PublishAsync
(
CapPublishedMessage
message
)
public
async
Task
PublishAsync
(
CapPublishedMessage
message
)
{
{
using
(
var
conn
=
new
MySqlConnection
(
_options
.
ConnectionString
))
using
(
var
conn
=
new
MySqlConnection
(
_options
.
ConnectionString
))
{
{
return
conn
.
ExecuteAsync
(
PrepareSql
(),
message
);
await
conn
.
ExecuteAsync
(
PrepareSql
(),
message
);
}
}
}
}
...
...
src/DotNetCore.CAP.PostgreSql/CapPublisher.cs
View file @
0ad6a92e
...
@@ -32,11 +32,11 @@ namespace DotNetCore.CAP.PostgreSql
...
@@ -32,11 +32,11 @@ namespace DotNetCore.CAP.PostgreSql
}
}
}
}
public
Task
PublishAsync
(
CapPublishedMessage
message
)
public
async
Task
PublishAsync
(
CapPublishedMessage
message
)
{
{
using
(
var
conn
=
new
NpgsqlConnection
(
_options
.
ConnectionString
))
using
(
var
conn
=
new
NpgsqlConnection
(
_options
.
ConnectionString
))
{
{
return
conn
.
ExecuteAsync
(
PrepareSql
(),
message
);
await
conn
.
ExecuteAsync
(
PrepareSql
(),
message
);
}
}
}
}
...
...
src/DotNetCore.CAP.SqlServer/CapPublisher.cs
View file @
0ad6a92e
...
@@ -28,14 +28,14 @@ namespace DotNetCore.CAP.SqlServer
...
@@ -28,14 +28,14 @@ namespace DotNetCore.CAP.SqlServer
if
(
_options
.
DbContextType
==
null
)
return
;
if
(
_options
.
DbContextType
==
null
)
return
;
IsUsingEF
=
true
;
IsUsingEF
=
true
;
_dbContext
=
(
DbContext
)
ServiceProvider
.
GetService
(
_options
.
DbContextType
);
_dbContext
=
(
DbContext
)
ServiceProvider
.
GetService
(
_options
.
DbContextType
);
}
}
public
Task
PublishAsync
(
CapPublishedMessage
message
)
public
async
Task
PublishAsync
(
CapPublishedMessage
message
)
{
{
using
(
var
conn
=
new
SqlConnection
(
_options
.
ConnectionString
))
using
(
var
conn
=
new
SqlConnection
(
_options
.
ConnectionString
))
{
{
return
conn
.
ExecuteAsync
(
PrepareSql
(),
message
);
await
conn
.
ExecuteAsync
(
PrepareSql
(),
message
);
}
}
}
}
...
...
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