I have existing with four properties and getting change in one of the fields from long to list. There is an existing code which is using already long. If I change it to List I am unable to modify the existing code. Please help me out.
before change:
public class Class1 {
public long prop1 { get; set; }
public long prop2 { get; set; }
public List<string> prop3 { get; set; }
public List<string> prop3 { get; set; }
}
Chnaged class with prop2
public class Class1 {
public long prop1 { get; set; }
public **List<long>** prop2 { get; set; }
public List<string> prop3 { get; set; }
public List<string> prop3 { get; set; }
}
var details = Data1
.Where(m => m.key== parameter1).FirstOrDefault();
var getdata =Data2
.Where(x => Data1.prop2.Contains(x.prop2))
.Select(x => new
{
prop1= x.prop1,
prop3 = x.prop3
})
.ToList();
Getting an error at x.prop2