Fix dapper from ids when the id list is empty

This commit is contained in:
Zoe Roux 2024-01-02 00:34:46 +01:00
parent 80a6ac0c80
commit df7b6ae71d

View File

@ -85,6 +85,8 @@ public abstract class DapperRepository<T> : IRepository<T>
/// <inheritdoc />
public async Task<ICollection<T>> FromIds(IList<Guid> ids, Include<T>? include = null)
{
if (!ids.Any())
return Array.Empty<T>();
return (
await Database.Query<T>(
Sql,