1 varquery = fromT0inchcontext. Expresssendmaster2Join T1inchcontext. Supplier on T0. Suppliercode equals T1. Suppliercode3Join T2inchcontext. Expresssendpackagerule on T0. Areaid equals T2. Id into T0_join4 fromT0_t2inchT0_join. DefaultIfEmpty ()5 whereT0. Id = =MasterID6 Select NewExpresspackageofflinemodel7 {8Packweight =t0. Weight,9Suppliercode =t1. Suppliercode,TenSupplierName =t1. Name, OneSenddate =t0. Senddate, AOneselfnumber =t0. Oneselfnumber, -Memo =t0. Memo, -Groupcheck =t0. AreaCode, theGroupName = T0_t2. Numbertype = =NULL?"": T0_t2. Numbertype, -GroupId = T0_t2. Id = =NULL?0: T0_t2. Id, -Limitweight = T0_t2. Limitweight = =NULL?0: T0_t2. Limitweight - }; + - + if(Query. Count () <=0) A { atModel. Haserror =true; -Model. ErrorMessage ="Error Hints"; - return false; - } - -Model. Packweight =query. First (). Packweight; inModel. Suppliercode =query. First (). Suppliercode; -Model. SupplierName =query. First (). SupplierName; toModel. Senddate =query. First (). Senddate; +Model. Oneselfnumber =query. First (). Oneselfnumber; -Model. GroupName =query. First (). GroupName; theModel. Memo =query. First (). Memo; *Model. Groupcheck =query. First (). Groupcheck; $Model. GroupId =query. First (). GroupId;Panax NotoginsengModel. Limitweight = query. First (). Limitweight;
View Code
Linq to SQL left connection query