Program.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. // See https://aka.ms/new-console-template for more information
  2. using System.Reflection;
  3. using Quadarax.Foundation.Core.QConsole;
  4. using Quadarax.Foundation.Core.QConsole.Configuration;
  5. using Quadarax.Foundation.Core.QConsole.Context;
  6. using Quadarax.Foundation.Core.Reflection.Extensions;
  7. /*
  8. var options = new DbContextOptions<QlbrcDbContext>();
  9. using (var ctx = new QlbrcDbContext(options))
  10. {
  11. var result = ctx.Database.EnsureCreated();
  12. Console.WriteLine($"Database created: {result}");
  13. }
  14. */
  15. var config = new StartupConfiguration(Quadarax.Application.QLiberace.Console.Constants.General.Name, Assembly.GetExecutingAssembly().GetName().Version);
  16. config.ConsoleCopyright = Assembly.GetExecutingAssembly().GetCopyright();
  17. config.AllowInteractive = false;
  18. config.WaitOnKeyInNonInteractiveMode = false;
  19. config.CommandDefinitionAssebmly = new[]{Assembly.GetEntryAssembly()};
  20. config.DisableDefaultCommands();
  21. config.ShowStatusOnEveryCommand = false;
  22. config.IsConsoleDebug = false;
  23. var console = new Engine(config, new DefualtEngineContext(), args);
  24. console.Start();
  25. Environment.Exit(console.ReturnCode);;