File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,14 @@ public IPostgrestTableWithCache<T> Table<T>(IPostgrestCacheProvider cacheProvide
104104 } ;
105105
106106
107+ /// <inheritdoc />
108+ public async Task < TModeledResponse ? > Rpc < TModeledResponse > ( string procedureName , object ? parameters = null )
109+ {
110+ var response = await Rpc ( procedureName , parameters ) ;
111+
112+ return string . IsNullOrEmpty ( response . Content ) ? default : JsonConvert . DeserializeObject < TModeledResponse > ( response . Content ! ) ;
113+ }
114+
107115 /// <inheritdoc />
108116 public Task < BaseResponse > Rpc ( string procedureName , object ? parameters = null )
109117 {
Original file line number Diff line number Diff line change @@ -62,6 +62,15 @@ public interface IPostgrestClient : IGettableHeaders
6262 /// <returns></returns>
6363 Task < BaseResponse > Rpc ( string procedureName , object ? parameters ) ;
6464
65+ /// <summary>
66+ /// Perform a stored procedure call.
67+ /// </summary>
68+ /// <param name="procedureName">The function name to call</param>
69+ /// <param name="parameters">The parameters to pass to the function call</param>
70+ /// <typeparam name="TModeledResponse">A type used for hydrating the HTTP response content (hydration through JSON.NET)</typeparam>
71+ /// <returns>A hydrated model</returns>
72+ Task < TModeledResponse ? > Rpc < TModeledResponse > ( string procedureName , object ? parameters = null ) ;
73+
6574 /// <summary>
6675 /// Returns a Table Query Builder instance for a defined model - representative of `USE $TABLE`
6776 /// </summary>
You can’t perform that action at this time.
0 commit comments