-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDbWorker.cs
35 lines (30 loc) · 998 Bytes
/
DbWorker.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MySql.Data;
using MySql.Data.MySqlClient;
using System.Configuration;
namespace IRCbot
{
public static class DbWorker
{
private static string ConnectionString = ConfigurationManager.AppSettings["mysql-cstring"];
public static MySqlDataReader ExecuteReader(string text)
{
return MySqlHelper.ExecuteReader(ConnectionString, text);
}
public static MySqlDataReader ExecuteReader(string text, MySqlParameter[] parameters)
{
return MySqlHelper.ExecuteReader(ConnectionString, text, parameters);
}
public static int ExecuteNonQuery(string text)
{
return ExecuteNonQuery(text, null);
}
public static int ExecuteNonQuery(string text, MySqlParameter[] parameters)
{
return MySqlHelper.ExecuteNonQuery(ConnectionString, text, parameters);
}
}
}