i have 3 tables and when the 2 table is null i have an error. what is the problem with my code.
- var list = (from t in tracking
- join d in _departureItemsTableService.GetAll() on t.box_id.Trim() equals d.BoxNo.Trim() into mar from submark in mar.DefaultIfEmpty()
- join dt in _departureTableService.GetAll() on submark.DepartureId equals dt.DepartureId into dep from depart in dep.DefaultIfEmpty()
- select new TrackingListModel
- {
- Id = t.Id,
- Name = t.firstname_s + " " + t.lastname_s,
- Departure = depart?.DepartureDate ?? String.Empty,
- });

Vishvjit ShindeRank #3,119 · 459 reputationPosted Mar 12, 2020, 8:02 PM EDT
Denmark PusoRank #7,130 · 248 reputationPosted Mar 17, 2020, 10:39 PM EDT
Vishvjit Shinde