Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
Dapper
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
Dapper
Commits
01e6d8ff
Commit
01e6d8ff
authored
Apr 25, 2012
by
Xavier Poinas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a NullReferenceException when merging DynamicParameters
parent
ab858e08
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
SqlMapper.cs
Dapper/SqlMapper.cs
+3
-2
No files found.
Dapper/SqlMapper.cs
View file @
01e6d8ff
...
@@ -1978,7 +1978,7 @@ class ParamInfo
...
@@ -1978,7 +1978,7 @@ class ParamInfo
/// <summary>
/// <summary>
/// construct a dynamic parameter bag
/// construct a dynamic parameter bag
/// </summary>
/// </summary>
/// <param name="template">can be an anonymous type o
f
a DynamicParameters bag</param>
/// <param name="template">can be an anonymous type o
r
a DynamicParameters bag</param>
public
DynamicParameters
(
object
template
)
public
DynamicParameters
(
object
template
)
{
{
if
(
template
!=
null
)
if
(
template
!=
null
)
...
@@ -1989,7 +1989,7 @@ public DynamicParameters(object template)
...
@@ -1989,7 +1989,7 @@ public DynamicParameters(object template)
/// <summary>
/// <summary>
/// Append a whole object full of params to the dynamic
/// Append a whole object full of params to the dynamic
/// EG: AddParams(new {A = 1, B = 2}) // will add property A and B to the dynamic
/// EG: Add
Dynamic
Params(new {A = 1, B = 2}) // will add property A and B to the dynamic
/// </summary>
/// </summary>
/// <param name="param"></param>
/// <param name="param"></param>
public
void
AddDynamicParams
(
public
void
AddDynamicParams
(
...
@@ -2023,6 +2023,7 @@ dynamic param
...
@@ -2023,6 +2023,7 @@ dynamic param
if
(
subDynamic
.
templates
!=
null
)
if
(
subDynamic
.
templates
!=
null
)
{
{
templates
=
templates
??
new
List
<
object
>();
foreach
(
var
t
in
subDynamic
.
templates
)
foreach
(
var
t
in
subDynamic
.
templates
)
{
{
templates
.
Add
(
t
);
templates
.
Add
(
t
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment