Пример #1
0
        static async Task TestAsync()
        {
            try {
                var adapter = new SqlAdapter {
                    ConnectionString = connectionString
                };
                var book = new Book {
                    IsbnCode = "4774180947", Title = "C#プログラマーのための 基礎からわかるLINQマジック!"
                };
                await adapter.InsertAsync(book);

                await adapter.DeleteAsync(book);

                await adapter.CreateAsync <Author>();

                await adapter.CreateAsync <Writing>();

                await adapter.DropAsync <Author>();

                await adapter.DropAsync <Writing>();
            }
            catch (Exception ex) {
                Console.WriteLine($"エラー: {ex.Message}");
            }
        }