Exemplo n.º 1
0
        public UnitOfWorkLibraryService(string connectionString, string migrationAssemblyName)
        {
            _context = new LibraryContext(connectionString, migrationAssemblyName);

            BookIssueRepositor   = new BookIssueRepository(_context);
            ReturnBookRepository = new ReturnBookRepository(_context);
            BookRepository       = new BookRepository(_context);
            StudentRepository    = new StudentRepository(_context);
        }
Exemplo n.º 2
0
        public LibraryUnitOfWork(string ConnectionString, string MigrationAssemblyName)
        {
            _context = new LibraryContext(ConnectionString, MigrationAssemblyName);

            BookIssueRepository  = new BookIssueRepository(_context);
            ReturnBookRepository = new ReturnBookRepository(_context);
            BookRepository       = new BookRepository(_context);
            StudentRepository    = new StudentRepository(_context);
        }