We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It's mostly useful for enums. When in the code it is Enum and in the database it is short for example.
Enum
short
Now:
[Query(@" UPDATE public.table_with_enum SET status = $1 WHERE id = $2 ; ", "SetStatus", methodType: MethodType.Async, sourceType: Gedaq.Npgsql.Enums.SourceType.Connection, queryType: QueryType.NonQuery, accessModifier: AccessModifier.Public ), Parametr(typeof(short), position: 1, methodParametrName: "status"), Parametr(typeof(long), position: 2, methodParametrName: "id") ] private void ConfigSetStatus() { } public SomeMethod() { await SetStatus(connection: connection, status: (short)CurrentStatus.New, id: 1); }
Excpect:
[Query(@" UPDATE public.table_with_enum SET status = $1 WHERE id = $2 ; ", "SetStatus", methodType: MethodType.Async, sourceType: Gedaq.Npgsql.Enums.SourceType.Connection, queryType: QueryType.NonQuery, accessModifier: AccessModifier.Public ), Parametr(typeof(short), position: 1, methodParametrName: "status", methodParametrType: typeof(CurrentStatus)), Parametr(typeof(long), position: 2, methodParametrName: "id") ] private void ConfigSetStatus() { } public SomeMethod() { await SetStatus(connection: connection, status: CurrentStatus.New, id: 1); }
Add methodParameterType optional parameter.
methodParameterType
The text was updated successfully, but these errors were encountered:
Enumerations are quite common and writing a cast every time is quite tedious. It does not always make sense to add an implicit cast.
Sorry, something went wrong.
SoftStoneDevelop
No branches or pull requests
It's mostly useful for enums. When in the code it is
Enum
and in the database it isshort
for example.Now:
Excpect:
Add
methodParameterType
optional parameter.The text was updated successfully, but these errors were encountered: