Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
netcoreplus
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
netcoreplus
Commits
bb573a87
Commit
bb573a87
authored
May 27, 2019
by
阿星Plus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
v1.0.2
parent
9e2b6425
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
8 deletions
+11
-8
Plus.EntityFramework.csproj
src/Plus.EntityFramework/Plus.EntityFramework.csproj
+8
-2
PlusDbContext.cs
src/Plus.EntityFramework/PlusDbContext.cs
+2
-4
EfCoreRepositoryExtensions.cs
...ntityFramework/Repositories/EfCoreRepositoryExtensions.cs
+1
-2
No files found.
src/Plus.EntityFramework/Plus.EntityFramework.csproj
View file @
bb573a87
...
...
@@ -14,13 +14,19 @@
<RepositoryType>git</RepositoryType>
<PackageProjectUrl>https://github.com/Meowv/.netcoreplus</PackageProjectUrl>
<PackageIconUrl>https://avatars2.githubusercontent.com/u/13010050</PackageIconUrl>
<PackageLicense
Url>https://raw.githubusercontent.com/Meowv/.netcoreplus/master/LICENSE</PackageLicenseUrl
>
<PackageLicense
Expression>MIT</PackageLicenseExpression
>
<PackageTags>plus;plus.entityframework;.netcoreplus;</PackageTags>
<PackageReleaseNotes>Plus.EntityFramework</PackageReleaseNotes>
<Version>1.0.
0.3
</Version>
<Version>1.0.
2
</Version>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<NoWarn>1701;1702;1591</NoWarn>
<DocumentationFile>Plus.EntityFramework.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<NoWarn>1701;1702;1591</NoWarn>
<DocumentationFile>Plus.EntityFramework.xml</DocumentationFile>
</PropertyGroup>
...
...
src/Plus.EntityFramework/PlusDbContext.cs
View file @
bb573a87
...
...
@@ -244,8 +244,7 @@ namespace Plus.EntityFramework
protected
virtual
void
AddDomainEvents
(
List
<
DomainEventEntry
>
domainEvents
,
object
entityAsObj
)
{
var
generatesDomainEventsEntity
=
entityAsObj
as
IGeneratesDomainEvents
;
if
(
generatesDomainEventsEntity
==
null
)
if
(!(
entityAsObj
is
IGeneratesDomainEvents
generatesDomainEventsEntity
))
{
return
;
}
...
...
@@ -266,8 +265,7 @@ namespace Plus.EntityFramework
protected
virtual
void
CheckAndSetId
(
EntityEntry
entry
)
{
var
entity
=
entry
.
Entity
as
IEntity
<
Guid
>;
if
(
entity
!=
null
&&
entity
.
Id
==
Guid
.
Empty
)
if
(
entry
.
Entity
is
IEntity
<
Guid
>
entity
&&
entity
.
Id
==
Guid
.
Empty
)
{
var
idPropertyEntry
=
entry
.
Property
(
"Id"
);
...
...
src/Plus.EntityFramework/Repositories/EfCoreRepositoryExtensions.cs
View file @
bb573a87
...
...
@@ -14,8 +14,7 @@ namespace Plus.EntityFramework.Repositories
public
static
DbContext
GetDbContext
<
TEntity
,
TPrimaryKey
>(
this
IRepository
<
TEntity
,
TPrimaryKey
>
repository
)
where
TEntity
:
class
,
IEntity
<
TPrimaryKey
>
{
var
repositoryWithDbContext
=
ProxyHelper
.
UnProxy
(
repository
)
as
IRepositoryWithDbContext
;
if
(
repositoryWithDbContext
!=
null
)
if
(
ProxyHelper
.
UnProxy
(
repository
)
is
IRepositoryWithDbContext
repositoryWithDbContext
)
{
return
repositoryWithDbContext
.
GetDbContext
();
}
...
...
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