skip to Main Content

Json – MongoDB Sorting Not Working as Expected in C# with Aggregate Lookup

I'm trying to sort a list in MongoDB using C# with the following method: public async Task<SearchResponseDTO<CampaignValidateDTO>> Search(SearchRequestDTO<CampaignValidateSearchFilterDTO> searchRequestDTO, string tenantId) { var filterDefinition = GetSearchFilter(searchRequestDTO, tenantId); var totalItems = await mongoCollection.CountDocumentsAsync(filterDefinition); var itemsWithLookup = await mongoCollection.Aggregate() .Match(filterDefinition) .As<CampaignValidateDTO>() .Lookup<CampaignValidateDTO,…

VIEW QUESTION

JSON to XML using XSLT with changing the content

I want to convert existing json file to xml file and some values: json file: { "Code": "111", "UnitCode": "XYZ", "valueCond": { "ir": "#001", "nk": "portal" }, "property": "AFB139" } desire xml file: <map> <Code>111</Code> <UnitCode>XYZ</UnitCode> <valueCond> <ir>#001_1234</ir> <nk>portal:zeo</nk> <valueCond>…

VIEW QUESTION
Back To Top
Search