Created
August 31, 2012 16:09
-
-
Save mbmccormick/3555204 to your computer and use it in GitHub Desktop.
Shit that annoys me.
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
public int FetchMediumType(string device) | |
{ | |
SQLSelect select = new SQLSelect(Connection); | |
select.Columns("MediumType"); | |
select.From("dbo.Links"); | |
select.Distinct = true; | |
select.Where("FromPort", Op.Like, device) | |
.Or("ToPort", Op.Like, device); | |
return select.ExecuteScalar<int>(); | |
} | |
public int FetchMediumTypeFromString(string type) | |
{ | |
SQLSelect select = new SQLSelect(Connection); | |
select.Columns("PK"); | |
select.From("dbo.MediumType"); | |
select.Distinct = true; | |
select.Where("MediumType", Op.Equal, type); | |
return select.ExecuteScalar<int>(); | |
} |
And for the record, this is NOT my code...
A region!? Bleh!
regions, hiding bad code since 2003
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why the hell are there so many empty lines in this method? Why is there no new line between these methods? If these are similar methods, put them in a fucking region!