public async Task <IEnumerable <Account> > Read(Guid id)
        {
            await using var connection = new NpgsqlConnection(_databaseOptions.ToString());
            var queryResult = await connection.QueryMultipleAsync("SELECT * FROM \"Accounts\" WHERE \"Owner\" = @id", new { id });

            var result = queryResult.Read <Account>();

            return(result);
        }
 public async Task <bool> Create(Payment item)
 {
     await using var connection = new NpgsqlConnection(_databaseOptions.ToString());
     return(await connection.ExecuteAsync("INSERT INTO \"Transactions\" VALUES (nextval('\"TransactionsAutoIncrement\"'::regclass), @FromAccount, @ToAccount, @Amount, @When, @Type)", new
     {
         item.FromAccount,
         item.ToAccount,
         item.Amount,
         item.When,
         Type = (short)item.Type
     }) > 0);
 }
 public async Task <User> Read(Guid id)
 {
     await using var connection = new NpgsqlConnection(_databaseOptions.ToString());
     return(await connection.QueryFirstOrDefaultAsync <User>("SELECT * FROM \"Users\" WHERE \"Id\" = @id", new { id }));
 }