Large queries are slower in SSMS
Client processing time is the amount of time spent in milliseconds between the first received response packet and the last received response packet by the client.

When you run the query in SSMS it render the data row by row to the GUI. Your application doesn't do that. 

Setting the SSMS option to Discard results after execution will eliminate the time spent rendering the results to the grid, which should give you a comparable execution time: