Skip to content

Instantly share code, notes, and snippets.

@tncbbthositg
Created September 25, 2009 15:03
Show Gist options
  • Save tncbbthositg/193602 to your computer and use it in GitHub Desktop.
Save tncbbthositg/193602 to your computer and use it in GitHub Desktop.
[TestMethod]
public void TestIQueryableExtensions()
{
var folks = new List<Person>();
folks.Add(new Person{ Id = 1, Name = "Patrick" });
folks.Add(new Person { Id = 2, Name = "James" });
Assert.AreEqual(folks.GetById(1).Name, "Patrick");
Assert.AreEqual(folks.GetById(2).Name, "James");
}
private class Person : IEntityItem
{
public int Id { get; set; }
public string Name { get; set; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment