コード例 #1
0
        public void Dispose()
        {
            DatabaseObjects.Reverse();

            foreach (DatabaseResource databaseObject in DatabaseObjects)
            {
                databaseObject.Drop(SqlConnectionAE);
            }
            SqlConnectionAE.Dispose();
        }
コード例 #2
0
        public void Insert(SqlParameter parameter)
        {
            if (parameter.Value == null)
            {
                parameter.Value = DBNull.Value;
            }

            using SqlCommand sqlCommandAE = SqlConnectionAE.CreateCommand();
            string sql = $"INSERT INTO [{Table.Name}] ([{parameter.SqlDbType}]) VALUES ({parameter.ParameterName});";

            sqlCommandAE.CommandText = sql;
            sqlCommandAE.Parameters.Add(parameter);
            sqlCommandAE.ExecuteNonQuery();
        }