mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-10-15 18:55:07 +08:00
Update README.md
This commit is contained in:
16
README.md
16
README.md
@@ -318,3 +318,19 @@ catch (Exception)
|
||||
throw;
|
||||
}
|
||||
```
|
||||
## 7. Use SP
|
||||
```c
|
||||
//1. no result
|
||||
db.UseStoredProcedure(() =>
|
||||
{
|
||||
string spName = "sp_help";
|
||||
var getSpReslut = db.Ado.SqlQueryDynamic(spName, new { objname = "student" });
|
||||
});
|
||||
|
||||
//2. has result
|
||||
var result= db.UseStoredProcedure<dynamic>(() =>
|
||||
{
|
||||
string spName = "sp_help";
|
||||
return db.Ado.SqlQueryDynamic(spName, new { objname = "student" });
|
||||
});
|
||||
```
|
||||
|
Reference in New Issue
Block a user