خرید بک لینک

Vote count: 0

I have a stored procedure in my database and I am trying to execute it from EF.
Stored procedure contain only SELECT query.
This is my code in EF:

using (var context = new MY_Context())
            {
                var result= context.Database.ExecuteSqlCommand("exec MY_STORED_PROCEDURE_NAME");
            }

But it always retu me -1.
Procedure work when I run it in raw SQL and coection string is valid.

asked 46 secs ago

برچسب: نویسنده: استخدام کار تاريخ: شنبه 25 ارديبهشت 1395 ساعت: 17:42

صفحه بندی