Advertisement
sandunfx

Untitled

Jan 31st, 2020
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.75 KB | None | 0 0
  1.  public class WalletData
  2.     {
  3.         public string OwnerAlias { get; set; }
  4.         public string OwnerPin { get; set; }
  5.     }
  6.  
  7.  public WalletData GetWalletData(int nodeId)
  8.         {
  9.             using (DialogKioskEntities context = new DialogKioskEntities())
  10.             {
  11.                 var data = context.Nodes
  12.                                .Where(n => n.NodeId == nodeId)
  13.                                .Select(n => new
  14.                                {
  15.                                    ez = n.EzWallet
  16.                                })
  17.                                .FirstOrDefault();
  18.  
  19.                 WalletData wd = JsonConvert.DeserializeObject<WalletData>(data.ez.ToString());
  20.  
  21.                 return wd;
  22.             }
  23.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement