public async Task <OverShortDetailsEX> GetOverShortDetailsEX(string id, List <string> includesLst = null) { try { using (var t = new OverShortDetailsEXClient()) { var res = await t.GetOverShortDetailsEXByKey(id, includesLst).ConfigureAwait(continueOnCapturedContext: false); if (res != null) { return(new OverShortDetailsEX(res) { // OverShortDetailAllocations = new System.Collections.ObjectModel.ObservableCollection<OverShortDetailAllocation>(res.OverShortDetailAllocations.Select(y => new OverShortDetailAllocation(y))), // OversShortEX = (res.OversShortEX != null?new OversShortEX(res.OversShortEX): null), // InventoryItem = (res.InventoryItem != null?new InventoryItem(res.InventoryItem): null), // OverShortAllocationsEXes = new System.Collections.ObjectModel.ObservableCollection<OverShortAllocationsEX>(res.OverShortAllocationsEXes.Select(y => new OverShortAllocationsEX(y))) }); } else { return(null); } } } catch (FaultException <ValidationFault> e) { throw new Exception(e.Detail.Message, e.InnerException); } catch (Exception) { Debugger.Break(); throw; } }