public IActionItemRepository GetActionItemRepository() { if (actionItemRepository == null) { actionItemRepository = new ActionItemRepository(context); } return(actionItemRepository); }
public CorePersistenceContext(IServiceProvider serviceProvider) { if (context == null) { context = serviceProvider.GetService <CoreDbContext>(); } context?.Database.Migrate(); actionItemRepository = new ActionItemRepository(context); userRepository = new UserRepository(context); }