Skip to content

Commit c0966a9

Browse files
author
jtreuting
committed
Removed redundant object in object.Equals
1 parent f9b71bb commit c0966a9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

SharpRepository.XmlRepository/XmlRepositoryBase.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ protected override IQueryable<T> BaseQuery(IFetchStrategy<T> fetchStrategy = nul
6565

6666
private static IEnumerable<T> CloneList(IList<T> list)
6767
{
68-
// when you Google deep copy of generic list every answer uses either the IClonable interface on the T or haivng the T be Serializable
68+
// when you Google deep copy of generic list every answer uses either the IClonable interface on the T or having the T be Serializable
6969
// since we can't really put those constraints on T I'm going to do it via reflection
7070

7171
var type = typeof(T);
@@ -91,7 +91,7 @@ protected override void AddItem(T entity)
9191
{
9292
TKey id;
9393

94-
if (GetPrimaryKey(entity, out id) && object.Equals(id, default(TKey)))
94+
if (GetPrimaryKey(entity, out id) && Equals(id, default(TKey)))
9595
{
9696
id = GeneratePrimaryKey();
9797
SetPrimaryKey(entity, id);

0 commit comments

Comments
 (0)