Skip to content

Commit

Permalink
less ambiguous name for lookup row variable
Browse files Browse the repository at this point in the history
"enum" could confuse people with c# enums

pr #35
  • Loading branch information
timabell committed Aug 17, 2015
1 parent b0431e5 commit 9c7688f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ExampleUsage/EnumExample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public void CheckIfDescriptionColumnsExists()
// at some point you'd then run the sql (probably not like this, but this serves as a test that it's working)
context.Database.ExecuteSqlCommand(migrationSql);

var descriptions = context.Database.SqlQuery<Enum>("Select Id, Name, Description From Enum_Size");
var descriptions = context.Database.SqlQuery<LookupRow>("Select Id, Name, Description From Enum_Size");

var descriptionList = descriptions.ToList();

Expand All @@ -87,7 +87,7 @@ public void CheckIfDescriptionColumnsExists()
Assert.AreEqual(string.Empty, descriptionList.Single(x => x.Id == (int)Size.ReallyVeryBig).Description);
Assert.AreEqual("Huge you know?", descriptionList.Single(x => x.Id == (int)Size.Huge).Description);

var shapes = context.Database.SqlQuery<Enum>("Select Id, Name, Description From Enum_Shape");
var shapes = context.Database.SqlQuery<LookupRow>("Select Id, Name, Description From Enum_Shape");

var shapeList = shapes.ToList();

Expand Down Expand Up @@ -145,7 +145,7 @@ public enum Shape
Round
}

public class Enum
public class LookupRow
{
public int Id { get; set; }
public string Name { get; set; }
Expand Down

0 comments on commit 9c7688f

Please sign in to comment.