I have a mongo collection where i have field called links, this link has value like this
“/company/11761390”
Now in my code i have a comapny number that i need to match with this value after / one only.
To achieve this i Have written below code but that does not work
newAppointmentList.items.Where(a => a.links.company.Split('/')[2] == company_number).FirstOrDefault()
I have also tried the other way
newAppointmentList.items.Where(a => a.links.company.contains(company_number)).FirstOrDefault()
both not working.