Skip to content
This repository has been archived by the owner on Apr 19, 2021. It is now read-only.

Commit

Permalink
Merge branch 'master' of https://github.com/i66soft/osharp.git
Browse files Browse the repository at this point in the history
  • Loading branch information
gmf520 committed Mar 13, 2015
2 parents f96286f + e31b292 commit 2e23782
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/OSharp.Core.Data.Entity/Repository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ public OperationResult Update<TEditDto>(ICollection<TEditDto> dtos,
var entity = _dbSet.Where(predicate).Select(m => new { m.Id }).SingleOrDefault();
bool exists = (!(typeof(TKey).IsValueType) && id == null) || id.Equals(defaultId)
? entity != null
: entity != null && entity.Id.Equals(id);
: entity != null && !entity.Id.Equals(id);
return exists;
}

Expand Down Expand Up @@ -433,7 +433,7 @@ public async Task<int> UpdateAsync(TEntity entity)
var entity = await _dbSet.Where(predicate).Select(m => new { m.Id }).SingleOrDefaultAsync();
bool exists = (!(typeof(TKey).IsValueType) && id == null) || id.Equals(defaultId)
? entity != null
: entity != null && entity.Id.Equals(id);
: entity != null && !entity.Id.Equals(id);
return exists;
}

Expand Down

0 comments on commit 2e23782

Please sign in to comment.