如何设置subsonic以注销我的sql查询以及将在我的sql框中执行的内容?
答案 0 :(得分:2)
您可以像这样
以某种方式将日志编写器附加到提供者var provider = ProviderFactory.GetProvider("ApplicationServices");
var writer = new StreamWriter(
File.Open(@"c:\temp\sqlqueries.txt", FileMode.Append, FileAccess.Write, FileShare.ReadWrite)
);
provider.Log = writer;
return new SimpleRepository(provider, SimpleRepositoryOptions.RunMigrations);