-
Notifications
You must be signed in to change notification settings - Fork 600
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add xml doc comments for IExecute/Async, IStoredProc/Async
- Loading branch information
Showing
4 changed files
with
112 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,57 @@ | ||
using System.Collections.Generic; | ||
using System.Collections.Generic; | ||
|
||
namespace PetaPoco | ||
{ | ||
/// <summary> | ||
/// Defines methods for executing stored procedures. | ||
/// Defines an interface for executing stored procedures. | ||
/// </summary> | ||
public interface IStoredProc | ||
{ | ||
/// <summary> | ||
/// Runs a stored procedure, returning the results as an IEnumerable collection. | ||
/// Executes a stored procedure and returns the result as an IEnumerable of type T. | ||
/// </summary> | ||
/// <remarks> | ||
/// For any arguments which are POCOs, each readable property will be turned into a named parameter for the stored procedure. Arguments which are IDbDataParameters will be passed through. Any other argument types will throw an exception. | ||
/// </remarks> | ||
/// <typeparam name="T">The Type representing a row in the result set.</typeparam> | ||
/// <param name="storedProcedureName">The name of the stored procedure to run.</param> | ||
/// <param name="args">Arguments for the stored procedure.</param> | ||
/// <returns>An IEnumerable collection of result records.</returns> | ||
/// <param name="storedProcedureName">The name of the stored procedure to execute.</param> | ||
/// <param name="args">The arguments to pass to the stored procedure.</param> | ||
/// <returns>An IEnumerable of type T containing the result set of the stored procedure.</returns> | ||
IEnumerable<T> QueryProc<T>(string storedProcedureName, params object[] args); | ||
|
||
/// <summary> | ||
/// Runs a stored procedure, returning the results as typed list. | ||
/// Executes a stored procedure and returns the result as a List of type T. | ||
/// </summary> | ||
/// <remarks> | ||
/// For any arguments which are POCOs, each readable property will be turned into a named parameter for the stored procedure. Arguments which are IDbDataParameters will be passed through. Any other argument types will throw an exception. | ||
/// </remarks> | ||
/// <typeparam name="T">The Type representing a row in the result set.</typeparam> | ||
/// <param name="storedProcedureName">The name of the stored procedure to run.</param> | ||
/// <param name="args">Arguments for the stored procedure.</param> | ||
/// <returns>A List holding the results of the query.</returns> | ||
/// <param name="storedProcedureName">The name of the stored procedure to execute.</param> | ||
/// <param name="args">The arguments to pass to the stored procedure.</param> | ||
/// <returns>A List of type T containing the result set of the stored procedure.</returns> | ||
List<T> FetchProc<T>(string storedProcedureName, params object[] args); | ||
|
||
/// <summary> | ||
/// Executes a stored procedure and returns the first column of the first row in the result set.. | ||
/// Executes a stored procedure and returns the first column of the first row in the result set as type T. | ||
/// </summary> | ||
/// <remarks> | ||
/// For any arguments which are POCOs, each readable property will be turned into a named parameter for the stored procedure. Arguments which are IDbDataParameters will be passed through. Any other argument types will throw an exception. | ||
/// </remarks> | ||
/// <typeparam name="T">The type that the result value should be cast to.</typeparam> | ||
/// <param name="storedProcedureName">The name of the stored procedure to run.</param> | ||
/// <param name="args">Arguments for the stored procedure.</param> | ||
/// <returns>The scalar value cast to T.</returns> | ||
/// <param name="storedProcedureName">The name of the stored procedure to execute.</param> | ||
/// <param name="args">The arguments to pass to the stored procedure.</param> | ||
/// <returns>The scalar result of the stored procedure of type T.</returns> | ||
T ExecuteScalarProc<T>(string storedProcedureName, params object[] args); | ||
|
||
/// <summary> | ||
/// Executes a non-query stored procedure. | ||
/// Executes a non-query stored procedure and returns the number of rows affected. | ||
/// </summary> | ||
/// <remarks> | ||
/// For any arguments which are POCOs, each readable property will be turned into a named parameter for the stored procedure. Arguments which are IDbDataParameters will be passed through. Any other argument types will throw an exception. | ||
/// </remarks> | ||
/// <param name="storedProcedureName">The name of the stored procedure to run.</param> | ||
/// <param name="args">Arguments for the stored procedure.</param> | ||
/// <returns>The number of rows affected.</returns> | ||
/// <param name="storedProcedureName">The name of the stored procedure to execute.</param> | ||
/// <param name="args">The arguments to pass to the stored procedure.</param> | ||
/// <returns>The number of rows affected by the stored procedure.</returns> | ||
int ExecuteNonQueryProc(string storedProcedureName, params object[] args); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters