Skip to content

Commit 8e5563d

Browse files
committed
Update Static Uses for 5.0
1 parent 26f0163 commit 8e5563d

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

src/AutoMapper.Collection.EntityFramework/GenerateEntityFrameworkPrimaryKeyEquivilentExpressions.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,14 @@ public GenerateEntityFrameworkPrimaryKeyEquivilentExpressions(IConfigurationProv
1919
: base(new GenerateEntityFrameworkPrimaryKeyPropertyMaps<TDatabaseContext>(configurationProvider))
2020
{
2121
}
22+
23+
/// <summary>
24+
/// Generate EquivilencyExpressions based on EnityFramework's primary key
25+
/// Uses static API's Mapper for finding TypeMap between classes
26+
/// </summary>
27+
public GenerateEntityFrameworkPrimaryKeyEquivilentExpressions()
28+
: base(new GenerateEntityFrameworkPrimaryKeyPropertyMaps<TDatabaseContext>(Mapper.Configuration))
29+
{
30+
}
2231
}
2332
}

src/AutoMapper.Collection.LinqToSQL/GetLinqToSQLPrimaryKeyExpression.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@ public GetLinqToSQLPrimaryKeyExpression(IMapper mapper)
1818
/// Generate EquivilencyExpressions based on LinqToSQL's primary key
1919
/// Uses static API's Mapper for finding TypeMap between classes
2020
/// </summary>
21-
[Obsolete("Use version that passes instance of IMapper")]
2221
public GetLinqToSQLPrimaryKeyExpression()
23-
: base(new GetLinqToSQLPrimaryKeyProperties(Mapper.Instance.ConfigurationProvider))
22+
: base(new GetLinqToSQLPrimaryKeyProperties(Mapper.Configuration))
2423
{
2524
}
2625
}

0 commit comments

Comments
 (0)