Guest User

Untitled

a guest
Jul 17th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. create table agent_by_name (
  2. id uuid,
  3. name text,
  4. description text,
  5. primary key(name)
  6. );
  7.  
  8. create table agent_by_description (
  9. id uuid,
  10. name text,
  11. description text,
  12. primary key(description)
  13. );
  14.  
  15. public class AgentPOCO
  16. {
  17. public Guid Id;
  18. public string Name;
  19. public string Description;
  20. }
  21.  
  22. private ISession _session;
  23. var _mapper = new Mapper(_session);
  24.  
  25. ...
  26.  
  27. var cqlByName = new Cql("SELECT * FROM agent_by_name");
  28. var cqlByDescription = new Cql("SELECT * FROM agent_by_description");
  29.  
  30. ...
  31.  
  32. var mapResult1 = _mapper.Fetch<AgentPOCO>(cqlByName).AsQueryable();
  33. var mapResult2 = _mapper.Fetch<AgentPOCO>(cqlByDescription).AsQueryable();
Add Comment
Please, Sign In to add comment