public MainWindow() { InitializeComponent(); using ( Model.dbEntities ctx = new Model.dbEntities()) { var dbS = new SchemaDb(); dbS.Ctx = ctx; //First Table dbS.AddTable("PrinterMachines"); dbS.AddColumnToTable("PrinterMachines", "IdPrinterMachine", SchemaDb.IntPK, "10"); dbS.AddColumnToTable("PrinterMachines", "PrinterName", SchemaDb.String, "100"); //Index dbS.AddIndex("PrinterMachines", "PrinterName"); dbS.AddColumnToTable("PrinterMachines", "PrinterName", SchemaDb.String, "100"); dbS.AddColumnToTable("PrinterMachines", "Percent", SchemaDb.Double, "0"); //Second Table dbS.AddTable("SecondTable"); dbS.AddColumnToTable("SecondTable", "IdSecondTable", SchemaDb.IntPK, "0"); //Unsigned Int to implement Foreign Key dbS.AddColumnToTable("SecondTable", "IdPrinterMachine", SchemaDb.IntUS, "0"); dbS.AddForeignKey("SecondTable", "IdPrinterMachine", "PrinterMachines", "IdPrinterMachine"); //Change String length dbS.ChangeStringColumnLegth("PrinterMachines", "PrinterName", "160"); } }
public ProductsDDL(string dbName) { dbS = new SchemaDb(); dbS.DatabaseName = dbName; }
public CustomerSupplierDLL(string dbName) { dbS = new SchemaDb(); dbS.DatabaseName = dbName; }
public DocumentsDDL(string dbName) { dbS = new SchemaDb(); dbS.DatabaseName = dbName; }
public TaskExecutorsDDL(string dbName) { dbS = new SchemaDb(); dbS.DatabaseName = dbName; }
public CostDetailDDL(string dbName) { dbS = new SchemaDb(); dbS.DatabaseName = dbName; }
public TaskCentersDDL(string dbName) { dbS = new SchemaDb(); dbS.DatabaseName = dbName; }
public DataBaseDDL(string dbName) { dbS = new SchemaDb(); dbS.DatabaseName = dbName; }
public ArticlesDDL(string dbName) { dbS = new SchemaDb(); dbS.DatabaseName = dbName; }