Exemple #1
0
        static void Main(string[] args)
        {
            var connectionString = ConfigurationManager.ConnectionStrings["System.Data.SqlClient"].ConnectionString;
            var factory          = new SharpFactory(SqlClientFactory.Instance, connectionString);
            var consoleRunner    = new ConsoleRunner(factory.CreateDataClient(), Assembly.GetExecutingAssembly(), "Chinnok");

            consoleRunner.Start();
        }
Exemple #2
0
        static void Main(string[] args)
        {
            SharpDataLogging.LoggerFactory = new LoggerFactory().AddConsole(LogLevel.Debug);

            var factory = new SharpFactory(SqlClientFactory.Instance, "Data Source=(localdb)\\MSSQLLocalDB; Initial Catalog=sharp; Integrated Security=True; Encrypt=False; TrustServerCertificate=True; ApplicationIntent=ReadWrite;");

            using (var client = factory.CreateDataClient()) {
                new Example().Start(client);
            }
            Console.WriteLine("Done");
            Console.ReadLine();
        }