首先安裝安裝 Chloe.MySql 插件,可以參考github作者 [Chloe github]
安裝完成後, 下面寫個測試案例試試看
MySqlContext dbContext = new MySqlContext(new MySqlConnectionFactory(
"Server=localhost;Port=3306;Database=Chloe;"));
Person person = null;
var q = dbContext.Query<Person>();
object _result = q.Where(a => a.Id > 0).ToList();運行時出現錯誤
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Bcl.AsyncInterfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. 系统找不到指定的文件。
接著安裝 Microsoft.Bcl.AsyncInterfaces
留言
張貼留言