我编写了一个存储过程来使用SQL Server 2008中的一个DLL。
create proc stpMine
as
EXTERNAL NAME MyDll.[MyDll.ClassName].[StaticMethod]
此库使用Entity Framework和Json.Net。当我尝试运行存储过程时,它给出了以下错误:
在执行用户定义的例程或聚合期间发生.NET Framework错误" stpMine":
System.InvalidOperationException:动态操作只能在同类AppDomain中执行 System.InvalidOperationException:
在System.Runtime.CompilerServices.CallSiteBinder.BindCore [T](CallSite1 site, Object[] args)
1 ts,Action
at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid2[T0,T1](CallSite site, T0 arg0, T1 arg1)
at System.Data.Entity.SqlServer.SqlServerMigrationSqlGenerator.<GenerateStatements>b__2(Object o)
at System.Data.Entity.SqlServer.Utilities.IEnumerableExtensions.Each[T](IEnumerable1 action)
1 migrationOperations)
at System.Data.Entity.SqlServer.SqlServerMigrationSqlGenerator.GenerateStatements(IEnumerable
在System.Data.Entity.SqlServer.SqlServerMigrationSqlGenerator.Generate(IEnumerable1 migrationOperations, String providerManifestToken)
1次操作,String migrationId)
at System.Data.Entity.Migrations.DbMigrator.GenerateStatements(IList
at System.Data.Entity.Migrations.DbMigrator.ExecuteOperations(String migrationId,VersionedModel targetModel,IEnumerable1 operations, IEnumerable
1 systemOperations,Boolean downgrading,Boolean auto)
在System.Data.Entity.Migrations.DbMigrator.AutoMigrate(String migrationId,VersionedModel sourceModel,VersionedModel targetModel,Boolean downgrading)
在System.Data.Entity.Migrations.DbMigrator.Upgrade(IEnumerable1 pendingMigrations, String targetMigrationId, String lastMigrationId)
3 createMigrator,ObjectContext objectContext)
at System.Data.Entity.Migrations.DbMigrator.UpdateInternal(String targetMigration)
at System.Data.Entity.Migrations.DbMigrator.<>c__DisplayClassc.<Update>b__b()
at System.Data.Entity.Migrations.DbMigrator.EnsureDatabaseExists(Action mustSucceedToKeepDatabase)
at System.Data.Entity.Migrations.DbMigrator.Update(String targetMigration)
at System.Data.Entity.Internal.DatabaseCreator.CreateDatabase(InternalContext internalContext, Func
在System.D ......
任何人都可以指导我修复此错误吗?如果您确定这是因为EF,我可以重写我的上下文以直接使用ADO.NET,但我更喜欢保持它不受影响。