Chances are that you are hitting on a problem with parameter sniffing.
I suggest reading Slow in the Application, Fast in SSMS? by Erland Sommarskog to get a full understanding of the issue (long article but very good).
Chances are that you are hitting on a problem with parameter sniffing.
I suggest reading Slow in the Application, Fast in SSMS? by Erland Sommarskog to get a full understanding of the issue (long article but very good).