Class RedbStorageDslExtensions
Declarative storage verbs over — the string/Type-parameterized
counterparts of the lambda verbs in , designed for the XML
markup (a lambda cannot live in markup) and equally usable from C#.
Every verb resolves the service per exchange through
— the same
scoped model the lambda verbs use — and participates in an ambient redb transaction opened by
BeginRedbTransaction() like any other redb call on that service.
public static class RedbStorageDslExtensions
Inheritance
Methods
RedbDelete(IRouteDefinition, string, string?)
Deletes an object by id (no props type needed). The body is left untouched; the outcome
public static IRouteDefinition RedbDelete(this IRouteDefinition route, string idExpression, string? storage = null)
RedbGet(IRouteDefinition, Type, string, int, string?, string?)
Loads a RedbObject<TProps> by id and stores it into the target
public static IRouteDefinition RedbGet(this IRouteDefinition route, Type propsType, string idExpression, int depth = 10, string? storage = null, string? target = null)
RedbGetJson(IRouteDefinition, string, int, string?, string?)
Loads the whole object as raw JSON by id — the in-database materializer
public static IRouteDefinition RedbGetJson(this IRouteDefinition route, string idExpression, int depth = 10, string? storage = null, string? target = null)
RedbQuery(IRouteDefinition, Type, string?, string?, bool, int?, int?, string?, string?, string?, string?, string?, RedbQueryOutput)
A server-side query: the where condition string is translated onto
public static IRouteDefinition RedbQuery(this IRouteDefinition route, Type propsType, string? where = null, string? orderBy = null, bool descending = false, int? take = null, int? skip = null, string? filter = null, string? storage = null, string? target = null, string? whereRedb = null, string? orderByRedb = null, RedbQueryOutput outputType = RedbQueryOutput.List)
RedbSave(IRouteDefinition, Type?, bool, string?)
Saves the exchange body to redb storage and puts the saved object's id into the exchange
public static IRouteDefinition RedbSave(this IRouteDefinition route, Type? propsType = null, bool byUnique = false, string? storage = null)