private UnitOfWork(AmigooDbContext context) { _context = context; #region Initialize Repositories Accounts = new AccountRepository(_context); AccountAccess = new AccountAccessRepository(_context); Menus = new MenuRepository(_context); MenuCategories = new MenuCategoryRepository(_context); #endregion }
public static UnitOfWork Instance(AmigooDbContext context) { return(new UnitOfWork(context)); }