예제 #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);
        }
예제 #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);
        }