Advertisement
GeneralGDA

Reading from Excel

Jun 26th, 2014
520
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.80 KB | None | 0 0
  1. return
  2.     from record in numbers
  3.     .Zip(cadastralCosts, (number, cost) => new { Number = number, Cost = cost })
  4.     .Zip(specificCadastralCosts, (pair, spetialCost) => new { pair.Number, pair.Cost, SpecificCost = spetialCost })
  5.  
  6.     where record.Cost.IsDouble() && record.SpecificCost.IsDouble()
  7.  
  8.     let cadastralNumber = new CadastralNumber(record.Number.AsString())
  9.     let cadastralCost = record.Cost.AsOptionDouble().GetValueOrDefault()
  10.     let cadastralSpecificCost = record.SpecificCost.AsOptionDouble().GetValueOrDefault()
  11.  
  12.     select new RealEstate
  13.     {
  14.         CadastralNumber = cadastralNumber,
  15.         CadastralCost = cadastralCost,
  16.         CadastralCostUnit = _costUnit,
  17.         SpecificCadastralCost = cadastralSpecificCost,
  18.         SpecificCadastralCostUnit = _specificCostUnit
  19.     };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement