mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-31 04:04:21 -04:00
Fix dapper from ids when the id list is empty
This commit is contained in:
parent
80a6ac0c80
commit
df7b6ae71d
@ -85,6 +85,8 @@ public abstract class DapperRepository<T> : IRepository<T>
|
|||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public async Task<ICollection<T>> FromIds(IList<Guid> ids, Include<T>? include = null)
|
public async Task<ICollection<T>> FromIds(IList<Guid> ids, Include<T>? include = null)
|
||||||
{
|
{
|
||||||
|
if (!ids.Any())
|
||||||
|
return Array.Empty<T>();
|
||||||
return (
|
return (
|
||||||
await Database.Query<T>(
|
await Database.Query<T>(
|
||||||
Sql,
|
Sql,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user