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,
- });