You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to get hang of linq2db, but can't find any real examples.
for example I am trying to run a stored procedure (see below), however it does not seem to fire.
int x = DataConnectionExtensions.ExecuteProc(connection, "spName", DataParameter.Varchar("whateverParamName", "whateverParamValue"))
I am passing the parameters the right way?
Like sql, should it be EXEC spName @whateverParamName or is it ok
When I specify dataparameter do I need to specify with @? like @whateverParamName (DataParameter.Varchar("@whateverParamName", "whateverParamValue"))
Any guidance would be much appreciated.
The text was updated successfully, but these errors were encountered:
@journger, looks like you have to pass @ sign. Everything depends on data provider.
Many samples of code usage are located in our tests. So it is better to clone linq2db repo and analyse linq2db.sln.
Also T4 generator may generate procedure stubs automatically from real database.
Yep, we have inconsistency here. For ExecuteProc you need to specify parameter name with provider-specific parameter marker, e.g. @, but when you use parameter in query, linq2db adds marker for you.
We definitely have area for improvement here.
I am trying to get hang of linq2db, but can't find any real examples.
for example I am trying to run a stored procedure (see below), however it does not seem to fire.
int x = DataConnectionExtensions.ExecuteProc(connection, "spName", DataParameter.Varchar("whateverParamName", "whateverParamValue"))
I am passing the parameters the right way?
Like sql, should it be EXEC spName @whateverParamName or is it ok
When I specify dataparameter do I need to specify with @? like @whateverParamName (DataParameter.Varchar("@whateverParamName", "whateverParamValue"))
Any guidance would be much appreciated.
The text was updated successfully, but these errors were encountered: