Merged GsmDbStruct with GsmRO.

This commit is contained in:
2020-07-03 18:54:58 +01:00
parent 7ea7797750
commit 253911f89c
3 changed files with 34 additions and 42 deletions
-19
View File
@@ -1,19 +0,0 @@
namespace Gsm
{
public struct GsmDbStruct
{
public static class Tables
{
public static string Directories { get { return "Directories"; } }
public static string GameEntry { get { return "GameEntry"; } }
public static string RegistryList { get { return "RegistryList"; } }
}
public static class Columns
{
public static string ID { get { return "id"; } }
public static string GameID { get { return "GameID"; } }
public static string GameName { get { return "GameName"; } }
}
}
}
+14 -2
View File
@@ -1,12 +1,24 @@
using Dapper;
using FireLance.Models;
using System.Collections.Generic;
using System.Linq;
namespace Gsm
{
public class GsmRO : GsmDB
{
public static class Tables
{
public static string Directories { get { return "Directories"; } }
public static string GameEntry { get { return "GameEntry"; } }
public static string RegistryList { get { return "RegistryList"; } }
}
public static class Columns
{
public static string ID { get { return "id"; } }
public static string GameID { get { return "GameID"; } }
public static string GameName { get { return "GameName"; } }
}
public List<T> LoadRecords<T>(string select, string from, string column, string query, bool exactMatch)
{
string command = $"SELECT \"{select}\",*" +