0

我在玩新的 Insight.Databse 微型 ORM 来弄脏我的手。当我尝试将对象插入数据库时​​,通过使用 ConnectionStringSettings 上的扩展方法,它会抛出上面的错误。我有表并存储根据文档在数据库中创建的程序。这是引发异常的部分(我在 repo 上调用 InsertCustomer)

公共类 CustomerRepository { public static async Task InsertCustomer(Customer cust) { var connection = ConfigSettings.ConnectionString; var repo = connection.As(); 返回等待 repo.InsertCustomer(cust); } }

公共接口 ICustomerRepository { 任务 InsertCustomer(Customer cust); }

任何帮助将不胜感激谢谢 RJ

4

1 回答 1

1

If you're getting a NotImplementedException, and running v4.1.0 to 4.1.3 you're probably running into a problem registering your database provider.

I recommend using v4.1.4 or later and making sure you register the provider for your database.

See

https://github.com/jonwagner/Insight.Database/wiki/Installing-Insight

If you have any more problems, you can post an issue on github.

于 2014-04-28T20:00:27.327 回答