1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-03 00:52:49 -05:00

handle distinct selections from app code

This commit is contained in:
Kyle Spearrin
2017-04-17 13:11:39 -04:00
parent 4d298b9cf8
commit c7c5ae8f9a
6 changed files with 20 additions and 17 deletions

View File

@ -57,7 +57,8 @@ namespace Bit.Core.Repositories.SqlServer
new { UserId = userId },
commandType: CommandType.StoredProcedure);
return results.ToList();
// Return distinct Id results
return results.GroupBy(c => c.Id).Select(g => g.First()).ToList();
}
}
@ -70,7 +71,8 @@ namespace Bit.Core.Repositories.SqlServer
new { UserId = userId },
commandType: CommandType.StoredProcedure);
return results.ToList();
// Return distinct Id results
return results.GroupBy(c => c.Id).Select(g => g.First()).ToList();
}
}
@ -87,7 +89,8 @@ namespace Bit.Core.Repositories.SqlServer
},
commandType: CommandType.StoredProcedure);
return results.ToList();
// Return distinct Id results
return results.GroupBy(c => c.Id).Select(g => g.First()).ToList();
}
}