Entity framework has an easy and slick way to support MySql. In MySQL stored procedures are called stored routines. Routines can be called from Entity Framework using below syntax:
using (var dbContext = new DatabaseContext())
{
var subRoutine = string.Format("CALL StoredRoutineName('{0}','{1}')", value1, value2);
signInAttempts = dbContext.Database.SqlQuery<int>(subRoutine,
new MySqlParameter("value1", value1),
new MySqlParameter("value2", value2)).FirstOrDefault();
}
1 comment:
Hi,
I seen your solution, Seems to be good... Same solution i got where i searched for solution.
Before fixing this issue, I want to reproduce in our Local/ UAT environment. Did you have any idea... How can i reproduce this issue. Currently my projected using same EN-6.
Thanks
Chandra Sekhar.k
Post a Comment