mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 17:58:26 -04:00
.atl / .at reworked
This commit is contained in:
13
src/NadekoBot/Modules/Searches/Services/AtlExtensions.cs
Normal file
13
src/NadekoBot/Modules/Searches/Services/AtlExtensions.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using LinqToDB.EntityFrameworkCore;
|
||||
using NadekoBot.Services.Database.Models;
|
||||
|
||||
namespace NadekoBot.Modules.Searches
|
||||
{
|
||||
public static class AtlExtensions
|
||||
{
|
||||
public static Task<AutoTranslateChannel> GetByChannelId(this IQueryable<AutoTranslateChannel> set, ulong channelId)
|
||||
=> set.FirstOrDefaultAsyncLinqToDB(x => x.ChannelId == channelId);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user