Пример #1
0
 public EntityRepository()
 {
     _context = new SqlContext ();
 }
Пример #2
0
 public EntityRepository(string nameOrConnectionString)
 {
     _context = new SqlContext(NameOrConnectionString = nameOrConnectionString);
 }
Пример #3
0
 public EntityBackup(EntityRepository repository, int id)
 {
     _context = (_repository = repository).NameOrConnectionString != null ? new SqlContext(repository.NameOrConnectionString) : new SqlContext ();
     _backup = _context.Backups.Single(a => a.BackupId == id);
 }