Skip to main content

Peter Marshall

Peter Marshall

Peter Marshall

Peter Marshall

Peter Marshall

Peter Marshall

Find duplicates in a list C# COLLECTION

1 min read

if (providerUpdate.Departments.GroupBy(x => new { x.Id }).Where(x => x.Skip(1).Any()).Any())
{
    return new Result<ProviderUpdate, FailureReason>.Failure(new FailureReason.DepartmentDuplicateFailure());
}

Peter Marshall

Peter Marshall

Peter Marshall

Peter Marshall