Made GSM library consistent with Firelance.
This commit is contained in:
+10
-2
@@ -1,9 +1,11 @@
|
||||
using Dapper;
|
||||
using GSMParser.Inferfaces;
|
||||
using Microsoft.Data.Sqlite;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Gsm
|
||||
{
|
||||
public class GsmRO : GsmDB
|
||||
public class GsmRO : IGsmSqliteDBConnection
|
||||
{
|
||||
public static class Tables
|
||||
{
|
||||
@@ -19,6 +21,12 @@ namespace Gsm
|
||||
public static string GameName { get { return "GameName"; } }
|
||||
}
|
||||
|
||||
public SqliteConnection Database { get; private set; }
|
||||
public GsmRO(SqliteConnection db)
|
||||
{
|
||||
Database = db;
|
||||
}
|
||||
|
||||
public List<T> LoadRecords<T>(string select, string from, string column, string query, bool exactMatch)
|
||||
{
|
||||
string command = $"SELECT \"{select}\",*" +
|
||||
@@ -34,7 +42,7 @@ namespace Gsm
|
||||
command += $"LIKE \"%{query}%\"";
|
||||
}
|
||||
|
||||
return (List<T>) DBConnection.Query<T>(command, new DynamicParameters());
|
||||
return (List<T>) Database.Query<T>(command, new DynamicParameters());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user