mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
Migrate GetSystemById
This commit is contained in:
parent
511cf0ab55
commit
c927967c3b
5 changed files with 11 additions and 12 deletions
|
|
@ -1,5 +1,4 @@
|
|||
#nullable enable
|
||||
using System.Data;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Dapper;
|
||||
|
|
@ -8,6 +7,9 @@ namespace PluralKit.Core
|
|||
{
|
||||
public static class ModelQueryExt
|
||||
{
|
||||
public static Task<PKSystem?> QuerySystem(this IPKConnection conn, int id) =>
|
||||
conn.QueryFirstOrDefaultAsync<PKSystem?>("select * from systems where id = @id", new {id});
|
||||
|
||||
public static Task<PKMember?> QueryMember(this IPKConnection conn, int id) =>
|
||||
conn.QueryFirstOrDefaultAsync<PKMember?>("select * from members where id = @id", new {id});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue