Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/291.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 在ndbunit中使用除dbo以外的其他模式_C#_Asp.net_Sql Server 2008_Ndbunit - Fatal编程技术网

C# 在ndbunit中使用除dbo以外的其他模式

C# 在ndbunit中使用除dbo以外的其他模式,c#,asp.net,sql-server-2008,ndbunit,C#,Asp.net,Sql Server 2008,Ndbunit,我有一个使用Ndbunit测试的项目,它可以很好地用于dbo的表。当我在其他模式(例如schema.tableName)中使用表时,我得到一个错误。错误是: > NDbUnitQuery.GlobalTesting (TestFixtureSetUp): > NDbUnit.Core.NDbUnitException : > DbCommandBuilder.CreateSelectCommand(DataSet, string) failed for > tableNa

我有一个使用Ndbunit测试的项目,它可以很好地用于dbo的表。当我在其他模式(例如schema.tableName)中使用表时,我得到一个错误。错误是:

> NDbUnitQuery.GlobalTesting (TestFixtureSetUp):
> NDbUnit.Core.NDbUnitException :
> DbCommandBuilder.CreateSelectCommand(DataSet, string) failed for
> tableName = 'Code'   ----> System.Data.SqlClient.SqlException :
> Invalid object name 'Code'.

这里的问题是底层的.NET数据集设计器没有正确地识别模式。在Visual Studio数据集设计器中,必须“手动”在每个数据表定义的属性中输入模式前缀。在此之后,NDbUnit应该正确地处理其他模式中的表

有关详细信息,请参见