Skip to content

Commit 319f6a2

Browse files
Tyler CarlsonTyler Carlson
authored andcommitted
Obsolete static API calls
1 parent 001a487 commit 319f6a2

4 files changed

Lines changed: 8 additions & 2 deletions

File tree

src/AutoMapper.Collection/AutoMapper.Collection.EntityFramework/Extensions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public static class Extensions
1515
/// <typeparam name="TSource">Source table type to be updated</typeparam>
1616
/// <param name="source">DbSet to be updated</param>
1717
/// <returns>Persistance object to Update or Remove data</returns>
18+
[Obsolete("Use version that passes instance of IMapper")]
1819
public static IPersistance Persist<TSource>(this DbSet<TSource> source)
1920
where TSource : class
2021
{

src/AutoMapper.Collection/AutoMapper.Collection.EntityFramework/GenerateEntityFrameworkPrimaryKeyEquivilentExpressions.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System.Data.Entity.Infrastructure;
1+
using System;
2+
using System.Data.Entity.Infrastructure;
23
using AutoMapper.EquivilencyExpression;
34

45
namespace AutoMapper.EntityFramework
@@ -23,6 +24,7 @@ public GenerateEntityFrameworkPrimaryKeyEquivilentExpressions(IMapper mapper)
2324
/// Generate EquivilencyExpressions based on EnityFramework's primary key
2425
/// Uses static API's Mapper for finding TypeMap between classes
2526
/// </summary>
27+
[Obsolete("Use version that passes instance of IMapper")]
2628
public GenerateEntityFrameworkPrimaryKeyEquivilentExpressions()
2729
: base(new GenerateEntityFrameworkPrimaryKeyPropertyMaps<TDatabaseContext>(null))
2830
{

src/AutoMapper.Collection/AutoMapper.Collection.LinqToSQL/GetLinqToSQLPrimaryKeyExpression.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using AutoMapper.EquivilencyExpression;
1+
using System;
2+
using AutoMapper.EquivilencyExpression;
23

34
namespace AutoMapper.Collection.LinqToSQL
45
{
@@ -16,6 +17,7 @@ public GetLinqToSQLPrimaryKeyExpression(IMapper mapper)
1617
/// <summary>
1718
/// Generate EquivilencyExpressions based on LinqToSQL's primary key
1819
/// Uses static API's Mapper for finding TypeMap between classes
20+
[Obsolete("Use version that passes instance of IMapper")]
1921
/// </summary>
2022
public GetLinqToSQLPrimaryKeyExpression()
2123
: base(new GetLinqToSQLPrimaryKeyProperties(null))

src/AutoMapper.Collection/AutoMapper.Collection.LinqToSQL/PersistanceExtensions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public static class PersistanceExtensions
1515
/// <typeparam name="TSource">Source table type to be updated</typeparam>
1616
/// <param name="source">Table to be updated</param>
1717
/// <returns>Persistance object to Update or Remove data</returns>
18+
[Obsolete("Use version that passes instance of IMapper")]
1819
public static IPersistance Persist<TSource>(this Table<TSource> source)
1920
where TSource : class
2021
{

0 commit comments

Comments
 (0)