Last active
August 29, 2015 13:58
-
-
Save carbonrobot/10285808 to your computer and use it in GitHub Desktop.
This file contains 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 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