Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/21.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# RavenDB embedded-当尝试使用LoadStartingWithAsync或StreamAsync时,它不会';t返回预期结果_C#_.net_Database_Nosql_Ravendb - Fatal编程技术网

C# RavenDB embedded-当尝试使用LoadStartingWithAsync或StreamAsync时,它不会';t返回预期结果

C# RavenDB embedded-当尝试使用LoadStartingWithAsync或StreamAsync时,它不会';t返回预期结果,c#,.net,database,nosql,ravendb,C#,.net,Database,Nosql,Ravendb,当我尝试在测试中使用嵌入式ravenDB,并使用LoadStartingWithAsync或StreamAsync时,它不会返回预期的结果。当代码未在测试中执行时,它工作正常 我的ravendb测试配置如下所示: using (var store = new EmbeddableDocumentStore { RunInMemory = true, UseEmbeddedHttpServer = true

当我尝试在测试中使用嵌入式ravenDB,并使用LoadStartingWithAsync或StreamAsync时,它不会返回预期的结果。当代码未在测试中执行时,它工作正常

我的ravendb测试配置如下所示:

        using (var store = new EmbeddableDocumentStore
        {
            RunInMemory = true,
            UseEmbeddedHttpServer = true
        })
我使用的是复合字符串Id,例如:

$"employeeReport/{reportId}-{employeeId}"
当我使用

session.LoadAsync<EmployeeReport>(2-12) - for example
session.LoadAsync(2-12)-例如
它是有效的,但当我尝试使用它时:

var reports = await session
    .Advanced.LoadStartingWithAsync<EmployeeReport>("EmployeeReport/", ReportId + "*", 0, 128);
var报告=等待会话
.Advanced.LoadStartingWithAsync(“EmployeeReport/”,ReportId+“*”,0,128);

var reportsStream=wait session.Advanced.StreamAsync($“EmployeeReport/{ReportId}”);
它返回空集合

var reportsStream = await session.Advanced.StreamAsync<EmployeeReport>($"EmployeeReport/{ReportId}");