fix UpdateUser to use Exclude rather than Except method for linq. #98
19 lines
575 B
C#
19 lines
575 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace SQLiteRepository.Extensions
|
|
{
|
|
public static class EnumerableExtensions
|
|
{
|
|
public static IEnumerable<TSource> Exclude<TSource, TKey>(this IEnumerable<TSource> source,
|
|
IEnumerable<TSource> exclude, Func<TSource, TKey> keySelector)
|
|
{
|
|
var excludedSet = new HashSet<TKey>(exclude.Select(keySelector));
|
|
return source.Where(item => !excludedSet.Contains(keySelector(item)));
|
|
}
|
|
}
|
|
}
|