Text after "
I recently upgraded to VS2012 for a project (it was originally created in 2010) And also from one of the advanced database providers for reference (comprehensive data. Mango, comprehensive data.SQL client, extensive data .qlLient.Entity) in the new version 4.0. By doing so, the two lines of code that were already working did not refresh the data properly in their queries, which are contained within a statement that is always inside the function, so there is no long-term object in it. Both references and unit items (all other details work properly.) Single purchase order header from PO table to pull the tuple and single purchase order details from po_dtl table In an attempt to drag the item into a trumpet, keeping the code line reference in mind, the refresh call causes the data to be refreshed properly to start the reference code, but it is a serious performance killer and will not work for production, mentioning it Not that there should be no need to be refreshed, the EF function is called every time the query should be run again.
A portion of the code with the meat of the given function is omitted for clarity. I code po_dtl part is left as it is to determine what po_dtl are complicated to use tuple and the line will make the code hard to read code is unsuccessful, noted, calling him a Comment goes.
I have stepped through the code many times and have verified that
- the context object is always
- the value of the point (the header of the header Changes in expected form
- No matter what the value is poNum, the PO header returned from the first run of the query that was always this line of code < / Ol>
Public ReceivePieceInfo (AdvanceShippingNoticePiece item is given by, int profitUserId, list. Location receivedLocation DAT ETIME, receiveDate, string tripNumber) {// LinqContextMaster.NewProfitContext offers a new // reference every time he uses it (Profit.ProfitDatabase PD = LinqContextMaster.NewProfitContext) {decimal poNum = decimal.Parse (item.PurchaseOrderNumber ); Decimal poLineNum = decimal Purse (item purchase order line number); IEnumerable & LT; Profit.po> Profit_pos = null; // this is broken code - no matter what poNum, the // query always Was PO to ask profit_pos returns = pd.po.Where (Po = & gt; po.po_no == poNum); Profit .po profit_po = null; If (profit_pos.Count () == 1) profit_po = profit_pos.Single (); }}
Comments
Post a Comment