Skip to content

Instantly share code, notes, and snippets.

@carbonrobot
Last active August 29, 2015 13:58
Show Gist options
  • Save carbonrobot/10285808 to your computer and use it in GitHub Desktop.
Save carbonrobot/10285808 to your computer and use it in GitHub Desktop.
public partial class Category(){
public Category(){}
// THESE COME FROM LINQ CLASS
//public int Id { get; set; }
//public string Name { get; set; }
}
public class CategoryService{
public CategoryService(){}
public static IEnumerable<Category> GetAllCategories()
{
using (var context = new ShedEntities())
{
return context.Categories.ToList();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment