Created
January 3, 2013 08:42
-
-
Save SlyNet/4441891 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
select internalas0_.Id as Id30_, | |
internalas0_.InternalAssessmentConfigurationId as Internal2_30_, | |
internalas0_.InternalAssessorId as Internal3_30_, | |
internalas0_.ZipCode as ZipCode30_ | |
from dbo.InternalAssessmentMap internalas0_ | |
where replace(cast(internalas0_.ZipCode as nvarchar(50)), ' ' /* @p0 */, '' /* @p1 */) = '6123' /* @p2 */ |
This file contains hidden or 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
[Test] | |
public void should_be_able_to_use_replace_for_strings_in_sql() | |
{ | |
using (new SessionScope()) | |
{ | |
Query<InternalAssessmentMap>().Where(x => x.ZipCode.ToString().Replace(" ", "") == "6123").ToList(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment