Idea of the project: if someone wants to order a project development, here you can send an application.
using System.Data;
using System.Data.SqlClient;
namespace ProjectRequestTest.Core
{
public class DataAccessService : IDataAccessService
{
public static SqlConnection SqlConn()
{
var conn = new SqlConnection(Properties.ConnectionString);
if (conn.State != ConnectionState.Open)
{
conn.Open();
}
return conn;
}
void IDataAccessService.ExecuteSQL(SqlCommand cmd)
{
ExecuteSQL(cmd);
}
SqlConnection IDataAccessService.SqlConn()
{
return SqlConn();
}
public static void ExecuteSQL(SqlCommand cmd)
{
cmd.Connection = SqlConn();
cmd.ExecuteNonQuery();
cmd.Connection.Close();
}
}
}