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()
6060 private static Func < ObjectStateEntry , object > RelationshipEntryKey1 ;
6161
6262 public static object GetRelationshipEntryKey0 ( ObjectStateEntry entry )
63- {
64- var relationshipEntryType = typeof ( ObjectStateEntry ) . Assembly . GetType ( "System.Data.Objects.RelationshipEntry" ) ;
63+ {
6564
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
6670 if ( RelationshipEntryKey0 == null )
6771 {
6872 // Parameter
@@ -82,8 +86,11 @@ public static object GetRelationshipEntryKey0(ObjectStateEntry entry)
8286
8387 public static object GetRelationshipEntryKey1 ( ObjectStateEntry entry )
8488 {
89+ #if EF5
8590 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
8794 if ( RelationshipEntryKey1 == null )
8895 {
8996 // Parameter
@@ -103,8 +110,8 @@ public static object GetRelationshipEntryKey1(ObjectStateEntry entry)
103110#endif
104111
105112
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>
108115 public List < AuditEntry > Entries { get ; set ; }
109116
110117 /// <summary>Gets or sets the created by username.</summary>
You can’t perform that action at this time.
0 commit comments