public void RestaurarBase() { List <Backups> ListabackupRestore = new List <Backups>(); BackupDAC backupDAC = new BackupDAC(); ListabackupRestore = backupDAC.Read(); Backups backupRestore = new Backups(); int t = ListabackupRestore.Count() - 1; backupRestore.Path = @"C:\Backup\" + ListabackupRestore[t].Nombre + ".bak"; backupRestore.Nombre = ListabackupRestore[t].Nombre; backupRestore.Id = ListabackupRestore[t].Id; UsuariosComponent usuariosComponent = new UsuariosComponent(); RestoreDatabase(backupRestore); BitacoraComponent bitacoraComponent = new BitacoraComponent(); EventoBitacora eventoBitacora = new EventoBitacora(); Usuarios usuarios = new Usuarios(); usuarios.Id = 2; eventoBitacora.Id = 10; Bitacora bitacora = new Bitacora(usuarios, eventoBitacora); bitacoraComponent.Create(bitacora); }
public List <Backups> Read() { BackupDAC backupDAC = new BackupDAC(); return(backupDAC.Read()); }