static void Main(string[] args)
        {
            using var logStream = new StreamWriter("ef-logs.txt");

            var ob = new DbContextOptionsBuilder <Project0Context>();

            ob.UseSqlServer(GetConnectionString());
            ob.LogTo(logStream.WriteLine, LogLevel.Information);

            using var context = new Project0Context(ob.Options);

            IStoreRepository storeRepository = new StoreRepository(context);

            var prompts        = new ConsolePrompts(storeRepository);
            var interpreter    = new ConsoleInputInterpreter(prompts);
            var user_interface = new StoreInterface(prompts, interpreter);

            user_interface.Launch();
        }
Esempio n. 2
0
 public ConsoleInputInterpreter(ConsolePrompts prompts)
 {
     Prompts = prompts;
 }