CrazyIter_Bin 3 gadi atpakaļ
vecāks
revīzija
b7af4a3312

+ 1 - 1
TEAMModelOS/Controllers/Common/LessonRecordController.cs

@@ -203,7 +203,7 @@ namespace TEAMModelOS.Controllers
                 if (tmdids != null && tmdids.Count > 0) {
                     List< IdNameCode > codes= new List<IdNameCode> ();  
                     string sqltmd = $"select c.id,c.name,c.picture from c where c.id in ({string.Join(",", tmdids.Select(x => $"'{x}'"))})";
-                    await foreach (var item in _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, tbname).GetItemQueryIterator<IdNameCode>(queryText:sqltmd,requestOptions:new QueryRequestOptions { PartitionKey=new PartitionKey("Base") })){
+                    await foreach (var item in _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, "Teacher").GetItemQueryIterator<IdNameCode>(queryText:sqltmd,requestOptions:new QueryRequestOptions { PartitionKey=new PartitionKey("Base") })){
                         codes.Add(item);
                     }
                     if (codes.IsNotEmpty()) {