File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
src/shared/Z.EF.Plus.Audit.Shared Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -60,9 +60,13 @@ public Audit()
60
60
private static Func < ObjectStateEntry , object > RelationshipEntryKey1 ;
61
61
62
62
public static object GetRelationshipEntryKey0 ( ObjectStateEntry entry )
63
- {
64
- var relationshipEntryType = typeof ( ObjectStateEntry ) . Assembly . GetType ( "System.Data.Objects.RelationshipEntry" ) ;
63
+ {
65
64
65
+ #if EF5
66
+ var relationshipEntryType = typeof ( ObjectStateEntry ) . Assembly . GetType ( "System.Data.Objects.RelationshipEntry" ) ;
67
+ #else
68
+ var relationshipEntryType = typeof ( ObjectStateEntry ) . Assembly . GetType ( "System.Data.Entity.Core.Objects.RelationshipEntry" ) ;
69
+ #endif
66
70
if ( RelationshipEntryKey0 == null )
67
71
{
68
72
// Parameter
@@ -82,8 +86,11 @@ public static object GetRelationshipEntryKey0(ObjectStateEntry entry)
82
86
83
87
public static object GetRelationshipEntryKey1 ( ObjectStateEntry entry )
84
88
{
89
+ #if EF5
85
90
var relationshipEntryType = typeof ( ObjectStateEntry ) . Assembly . GetType ( "System.Data.Objects.RelationshipEntry" ) ;
86
-
91
+ #else
92
+ var relationshipEntryType = typeof ( ObjectStateEntry ) . Assembly . GetType ( "System.Data.Entity.Core.Objects.RelationshipEntry" ) ;
93
+ #endif
87
94
if ( RelationshipEntryKey1 == null )
88
95
{
89
96
// Parameter
@@ -103,8 +110,8 @@ public static object GetRelationshipEntryKey1(ObjectStateEntry entry)
103
110
#endif
104
111
105
112
106
- /// <summary>Gets or sets the entries.</summary>
107
- /// <value>The entries.</value>
113
+ /// <summary>Gets or sets the entries.</summary>
114
+ /// <value>The entries.</value>
108
115
public List < AuditEntry > Entries { get ; set ; }
109
116
110
117
/// <summary>Gets or sets the created by username.</summary>
You can’t perform that action at this time.
0 commit comments