Skip to content

Instantly share code, notes, and snippets.

@besingamkb
Last active August 29, 2015 14:07
Show Gist options
  • Save besingamkb/a09a3afe94e4f499ac91 to your computer and use it in GitHub Desktop.
Save besingamkb/a09a3afe94e4f499ac91 to your computer and use it in GitHub Desktop.
c# dbclass study
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MySql.Data.MySqlClient;
// require mysl.data on references
// author besingamk
namespace testentity
{
class DBconnect
{
private MySqlConnection connection;
private string server;
private string database;
private string uid;
private string password;
public DBconnect()
{
Initialize();
}
private void Initialize()
{
server = "localhost";
database = "family";
uid = "root";
password = "";
string connectionString;
connectionString = "SERVER=" + server + ";" + "DATABASE=" + database + ";" + "UID=" + uid + ";" + "PASSWORD=" + password + ";";
connection = new MySqlConnection(connectionString);
}
// open connection to database
private bool OpenConnection()
{
}
// close connection to database
private bool CloseConnection()
{
}
// insert statement
public void insert()
{
}
// update statement
public void update()
{
}
// delete statement
public void delete()
{
}
// select statement
public List<string>[] select()
{
}
//backup statement
public void backup()
{
}
// restore
public void restore()
{
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment