Guest User

Untitled

a guest
Jun 19th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. public async Task<Detail> GetDataAsync(int ticketId)
  2. {
  3. using (var dbConn = new OleDbConnection(AS400ConnectionString))
  4. {
  5.  
  6. string query = "LIBRARY.PROCNAME";
  7.  
  8. var p = new DynamicParameters();
  9. p.Add("TICKET", ticketId, direction: ParameterDirection.Input);
  10. var detail = await dbConn.QueryAsync<Detail>(query, p, commandType: CommandType.StoredProcedure, commandTimeout: Constants.AS400CommandTimeout);
  11.  
  12. return detail.FirstOrDefault();
  13. }
  14. }
Add Comment
Please, Sign In to add comment