Пример #1
0
 public void InitializeDatabase(IBrainstormSessionRepository repo)
 {
     if (!repo.List().Any())
     {
         repo.Add(GetTestSession());
     }
 }
Пример #2
0
 public async Task InitializeDatabaseAsync(IBrainstormSessionRepository repo)
 {
     var sessionList = await repo.ListAsync();
     if (!sessionList.Any())
     {
         await repo.AddAsync(GetTestSession());
     }
 }
Пример #3
0
 public HomeController(IBrainstormSessionRepository sessionRepository)
 {
     _sessionRepository = sessionRepository;
     if (Logger.inited == false)
     {
         Logger.InitLogger();
     }
 }
Пример #4
0
        /// <summary>
        /// Method for initialize database.
        /// </summary>
        /// <param name="repo">Interface of repository.</param>
        /// <returns>Nothing.</returns>
        public static async Task InitializeDatabaseAsync(IBrainstormSessionRepository repo)
        {
            if (repo is null)
            {
                throw new ArgumentNullException(nameof(repo));
            }

            var sessionList = await repo.ListAsync();

            if (!sessionList.Any())
            {
                await repo.AddAsync(GetTestSession());
            }
        }
Пример #5
0
 public IdeasController(IBrainstormSessionRepository sessionRepository)
 {
     _sessionRepository = sessionRepository;
 }
Пример #6
0
 public HomeController(IBrainstormSessionRepository brainstormSessionRepository)
 {
     _sessionRepository = brainstormSessionRepository;
 }
Пример #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HomeController"/> class.
 /// </summary>
 /// <param name="sessionRepository">Interface of repository.</param>
 public HomeController(IBrainstormSessionRepository sessionRepository)
 {
     this.sessionRepository = sessionRepository;
 }
 public IdeasController(IBrainstormSessionRepository sessionRepository, IValidatorStrategy <NewIdeaModel> validator)
 {
     _sessionRepository = sessionRepository;
     _validator         = validator;
 }
Пример #9
-1
 public void InitializeDatabase(IBrainstormSessionRepository repo)
 {
     if (!repo.List().Any())
     {
         repo.Add(GetTestSession());
     }
 }
Пример #10
-1
 public async Task InitializeDatabaseAsync(IBrainstormSessionRepository repo)
 {
     var sessionList = await repo.ListAsync();
     if (!sessionList.Any())
     {
         await repo.AddAsync(GetTestSession());
     }
 }
Пример #11
-1
 public SessionController(IBrainstormSessionRepository sessionRepository)
 {
     _sessionRepository = sessionRepository;
 }