Exemple #1
0
        protected virtual void Dispose(bool disposing)
        {
            if (!_disposed)
            {
                if (disposing)
                {
                    ApplicationDataBaseContext.Dispose();
                }
            }

            _disposed = true;
        }
 public UnitOfWork(ApplicationDataBaseContext applicationDataBaseContext)
 {
     _applicationDataBaseContext = applicationDataBaseContext;
     Computers            = new ComputerRepository(_applicationDataBaseContext);
     ComputerSystems      = new ComputerSystemRepository(_applicationDataBaseContext);
     Processors           = new ProcessorRepository(_applicationDataBaseContext);
     PhysicalMemories     = new PhysicalMemoryRepository(_applicationDataBaseContext);
     DiskDrives           = new DiskDriveRepository(_applicationDataBaseContext);
     MotherBoards         = new MotherBoardRepository(_applicationDataBaseContext);
     VideoCards           = new VideoCardRepository(_applicationDataBaseContext);
     Processes            = new ProcessRepository(_applicationDataBaseContext);
     ProcessesInformation = new ProcessInformationRepository(_applicationDataBaseContext);
     ProcessesPerfomance  = new ProcessPerfomanceRepository(_applicationDataBaseContext);
 }
Exemple #3
0
 public UnitOfWork(ApplicationDataBaseContext applicationDataBaseContext,
                   UserManager <ApplicationUser> userManager,
                   SignInManager <ApplicationUser> signInManager,
                   RoleManager <IdentityRole> roleManager)
 {
     _applicationDataBaseContext = applicationDataBaseContext;
     UserManager        = userManager;
     SignInManager      = signInManager;
     RoleManager        = roleManager;
     CommentLikes       = new CommentLikeRepository(_applicationDataBaseContext);
     Comments           = new CommentRepository(_applicationDataBaseContext);
     LectureNoteRatings = new LectureNoteRatingRepository(_applicationDataBaseContext);
     LectureNotes       = new LectureNoteRepository(_applicationDataBaseContext);
     LectureNoteTags    = new LectureNoteTagRepository(_applicationDataBaseContext);
     SpecialtyNumber    = new SpecialtyNumberRepositpry(_applicationDataBaseContext);
     Tags  = new TagRepository(_applicationDataBaseContext);
     Users = new UserRepository(_applicationDataBaseContext);
 }
Exemple #4
0
 public Repository(ApplicationDataBaseContext dataBaseContext)
 {
     _dataBaseContext = dataBaseContext;
     _DbSet           = _dataBaseContext.Set <TEntity>();
 }
Exemple #5
0
 public async Task SaveAsync() => await ApplicationDataBaseContext.SaveChangesAsync();
 public LectureNoteTagRepository(ApplicationDataBaseContext dataBaseContext)
     : base(dataBaseContext)
 {
 }
 public ProcessInformationRepository(ApplicationDataBaseContext applicationDataBaseContext)
     : base(applicationDataBaseContext)
 {
 }
 public VideoCardRepository(ApplicationDataBaseContext applicationDataBaseContext)
     : base(applicationDataBaseContext)
 {
 }
Exemple #9
0
 public DiskDriveRepository(ApplicationDataBaseContext applicationDataBaseContex)
     : base(applicationDataBaseContex)
 {
 }
 public ComputerSystemRepository(ApplicationDataBaseContext applicationDataBaseContext)
     : base(applicationDataBaseContext)
 {
 }
Exemple #11
0
 public PhysicalMemoryRepository(ApplicationDataBaseContext applicationDataBaseContext)
     : base(applicationDataBaseContext)
 {
 }
Exemple #12
0
 protected Repository(ApplicationDataBaseContext applicationDataBaseContext)
 {
     _applicationDataBaseContext = applicationDataBaseContext;
     _DbSet = _applicationDataBaseContext.Set <TEntity>();
 }
Exemple #13
0
 public ProcessPerfomanceRepository(ApplicationDataBaseContext applicationDataBaseContext)
     : base(applicationDataBaseContext)
 {
 }
 public TagRepository(ApplicationDataBaseContext dataBaseContext)
     : base(dataBaseContext)
 {
 }
Exemple #15
0
 public CommentRepository(ApplicationDataBaseContext dataBaseContext)
     : base(dataBaseContext)
 {
 }
Exemple #16
0
 public MotherBoardRepository(ApplicationDataBaseContext applicationDataBaseContext)
     : base(applicationDataBaseContext)
 {
 }
Exemple #17
0
 public SpecialtyNumberRepositpry(ApplicationDataBaseContext dataBaseContext)
     : base(dataBaseContext)
 {
 }