/// <summary> /// Metod som sparar uppdaterad data i CourseRepository och ModuleRepository /// </summary> /// <returns>Task</returns> public async Task CompleteAsync() { await CourseRepository.SaveAsync(); await ModuleRepository.SaveAsync(); }
public UoW(ApplicationDbContext db) { this.db = db; CourseRepository = new CourseRepository(db); ModuleRepository = new ModuleRepository(db); }
/// <summary> /// Konstruktor /// </summary> /// <param name="dbContext">Context</param> public UnitOfWork(ApplicationDbContext dbContext) { this.m_dbContext = dbContext; CourseRepository = new CourseRepository(m_dbContext); ModuleRepository = new ModuleRepository(m_dbContext); }
public UoW(ApplicationDbContext context) { db = context; CourseRepository = new CourseRepository(db); ModuleRepository = new ModuleRepository(db); }