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
Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)
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
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)