I am getting error of invalid arguments when I try to compare two lists using SequenceEqual or Except function in Linq using C# code. My code is as follow,
var one = db.arabia_upod_item_availability_masters.ToList();
var two = db.vw_get_arabia_upod_report_quantityOrderedPerItem_uhjs.ToList();
var result = one.SequenceEqual(two).ToString();
It is same for Except function also. But in both case I get error. Why is it so? What can be the solution?
Thanks in Advance.
SequenceEqual and Enumerable.Except throw ArgumentNullException, Possibly either (or both) of your lists
oneortwois null.You may check prior to using SequenceEqual.