0
新的ServiceStack並需要一些說明。ServiceStack無法將OrmLiteConnectionFactory轉換爲IDbConnectionFactory
我正在尋找將我的ServiceStack應用程序連接到SQL Server,但卡住了。我讀OrmLiteConnectionFactory從IDbConnectionFactory繼承但代碼加下劃線用紅色:
container.Register<IDbConnectionFactory>(new OrmLiteConnectionFactory(Properties.Settings.Default.SQLEXPRESSConnectionString,
SqlServerOrmLiteDialectProvider.Instance));
和錯誤信息是:
Error 3 Argument 1: cannot convert from 'ServiceStack.OrmLite.OrmLiteConnectionFactory' to 'System.Data.Entity.Infrastructure.IDbConnectionFactory'
這裏面AppHost.cs's Configure
方法。
對此有何建議?非常感謝。