-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
CommonGeneratorApplies to all supported providersApplies to all supported providers
Milestone
Description
Old way, only a pre-known query
[Query(
@"
SELECT
p.id,
p.firstname,
~StartInner::Identification:id~
i.id,
i.typename,
~EndInner::Identification~
p.middlename,
p.lastname
FROM person p
LEFT JOIN identification i ON i.id = p.identification_id
WHERE p.id > $1
",
"GetAllPerson",
typeof(Person),
MethodType.Sync | MethodType.Async
),
Parametr(parametrType: typeof(int), position: 1)
]
public class Person
//...New way:
If parameters known:
[Query(
"GetAllPerson",
typeof(Person),
MethodType.Sync | MethodType.Async,
DynamicQuery: true),
Parametr(parametrType: typeof(int), position: 1)
]
public class Person
//...If parameters unknown:
[Query(
"GetAllPerson",
typeof(Person),
MethodType.Sync | MethodType.Async,
DynamicQuery: true),
DynamicParametrs(PositionParametrs: true)
]
public class Person
//...DynamicParameters means that the parameters are not known in advance. If PositionParametrs is true, the parameters are passed as Dictionary<int, NpgsqlParameter> where key is Position; otherwise, the parameters are passed as NpgsqlParameter[].
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
CommonGeneratorApplies to all supported providersApplies to all supported providers