public List <FrayteRateThirdPartyMatrix> GetThirdPartyMatrix(int LogisticServiceId) { List <FrayteRateThirdPartyMatrix> _matrix = new List <FrayteRateThirdPartyMatrix>(); FrayteRateThirdPartyMatrix third; var matrix = dbContext.Get_ThirdPartyMatrix(LogisticServiceId).ToList(); if (matrix != null && matrix.Count > 0) { foreach (var Obj in matrix) { third = new FrayteRateThirdPartyMatrix(); third.FromLogisticServiceZoneId = Obj.FromLogisticServiceZoneId; third.FromZoneDisplay = Obj.FromZoneDisplayName; third.ToLogisticServiceZoneId = Obj.ToLogisticServiceZoneId; third.ToZoneDisplay = Obj.ToZoneDisplayName; third.ApplyLogisticServiceZoneId = Obj.ApplyLogisticServiceZoneId; third.ApplyZoneDisplay = Obj.ApplyZoneDisplayName; _matrix.Add(third); } } return(_matrix); }