예제 #1
0
 public async Task ShouldWorkAtLeast()
 {
     NpgsqlConnection.GlobalTypeMapper.MapEnum <CallType>("call_type_enum");
     using (var db = new BillingContext())
     {
         await db.BulkCopyAsync(new[] { new Call {
                                            CalledNumber = "bc"
                                        } });
     }
 }
예제 #2
0
        static async Task Main()
        {
            NpgsqlConnection.GlobalTypeMapper.MapComposite <Call>("call_ct");
            NpgsqlConnection.GlobalTypeMapper.MapEnum <CallType>("call_type_enum");

            var context = new BillingContext();
            await context.BulkCopyAsync(new[] { new Call() });

            Application.SetHighDpiMode(HighDpiMode.SystemAware);
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            var mainForm = new Visualization();

            mainForm.Controls.AddRange(new Engine().GetLinkedControls());
            Application.Run(mainForm);
        }