You can create DB script and execute using .NET code as below:
Process scriptProc = new Process();
scriptProc.StartInfo.FileName = @"cscript";
scriptProc.StartInfo.Arguments ="//B //Nologo c:\scripts\test.vbs";
scriptProc.Start();
scriptProc.WaitForExit();
scriptProc.Close();