KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am trying to filter some objects using linq to enitites and I get an error telling me "Enumeration yielded no results". on the client side I get a message like this: The operation cannot be completed because the DbContext has been disposed I know that these filter values should return some results but it just doesnt work, so Im guessing my query is wrong, can you help please. var mediaChannels = NeptuneUnitOfWork.MediaChannels .FindWhere(m => m.CountryID == CountryID && m.SonarMediaTypeID == MediaTypeID && m.SonarMediaTypes.SonarMediaGroupID == MediaGroupID && m.Name.Contains(search)) .Select(m => new MediaChannelModel() { ID = m.ID, Name = m.Name, MediaType = m.MediaType.Name, Country = m.Countries.Name, SubRegion = m.Countries.Lookup_SubRegions.Name, Region = m.Countries.Lookup_SubRegions.Lookup_Regions.Name });
Tags (comma-separated)
Save Edits
Cancel