0
squaresunion created
Hello something that is really killing me
trying to execute a stored proc (Angular 5 .Net Core) g.Database.ExecuteSqlCommand("EXEC sp_GetNextBusinessId"); But is is always returning -1. Tried to use an output parameter, always returning value 0; Can somebody help. Please.
Regards
2 Answer(s)
-
0
Ok found the proper way to do it.
SqlParameter param = new SqlParameter() { ParameterName = "@MyID", SqlDbType = SqlDbType.BigInt, Direction = ParameterDirection.Output }; var t = g.Database.ExecuteSqlCommand("EXEC sp_GetNextBusinessId @MyID OUT", param);
this works fine
-
0