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
aec04802
Commit
aec04802
authored
Jul 29, 2011
by
mgravell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
field; case sensitive first
parent
f094b4a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
SqlMapper.cs
Dapper/SqlMapper.cs
+1
-1
No files found.
Dapper/SqlMapper.cs
View file @
aec04802
...
...
@@ -1322,7 +1322,7 @@ static List<FieldInfo> GetSettableFields(Type t)
from
n
in
names
let
prop
=
properties
.
FirstOrDefault
(
p
=>
string
.
Equals
(
p
.
Name
,
n
,
StringComparison
.
Ordinal
))
// property case sensitive first
??
properties
.
FirstOrDefault
(
p
=>
string
.
Equals
(
p
.
Name
,
n
,
StringComparison
.
OrdinalIgnoreCase
))
// property case insensitive second
let
field
=
prop
!=
null
?
null
:
(
fields
.
FirstOrDefault
(
p
=>
string
.
Equals
(
p
.
Name
,
n
,
StringComparison
.
Ordinal
IgnoreCase
))
// field case sensitive third
let
field
=
prop
!=
null
?
null
:
(
fields
.
FirstOrDefault
(
p
=>
string
.
Equals
(
p
.
Name
,
n
,
StringComparison
.
Ordinal
))
// field case sensitive third
??
fields
.
FirstOrDefault
(
p
=>
string
.
Equals
(
p
.
Name
,
n
,
StringComparison
.
OrdinalIgnoreCase
)))
// field case insensitive fourth
select
new
{
Name
=
n
,
Property
=
prop
,
Field
=
field
}
).
ToList
();
...
...
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