I have the following LINQ query:
vm.Ter = (from tr in DataContext.Terr_Rp join dm in DataContext.Dt_Mrs on tr.T_ID equals dm.D_ID + "00" select tr).ToList();
I need to find those that do not have a match. This means that there is no connection. I tried unequal, but C # has problems with it.
Using !Any() should do the trick.
!Any()
vm.Ter = (from tr in DataContext.Terr_Rp where !DataContext.Dt_Mrs.Any(dm => tr.T_ID == dm.D_ID + "00") select tr).ToList();
var list1 = new List<int>{1,2,3,4,5,6}; var list2 = new List<int>{5,6,7,8,9,10}; var result = from l1 in list1 where !list2.Contains(l1) select l1; result: {1,2,3,4}
Source: https://habr.com/ru/post/1391531/More articles:Correct orientation prevention in Flex Mobile app - flexWhy is ff still storing data in RAM? - memory-managementGet last entered identifier - c #Downloading ffdf data takes up a lot of memory - rNSUserDefaults written in -applicationWillTerminate: do not take effect; What for? - ioshttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1391532/how-a-threaded-server-continues-to-listen-on-the-post-for-more-incoming-connections&usg=ALkJrhgXIq-xZST_4wqT5OeQJvlDSOeS-gWhat design model am I using? - design-patternscommonModalDialogClose (SP.UI.DialogResult.OK, someValue) throws an error - javascriptWhat is the format of an A / V container with streaming support? - containerspossible to use YARD to document erb patterns - ruby-on-railsAll Articles