public static IList<BlogModel> RetrieveBlogs(BlogContext context) { return context.Blogs.ToList(); }
public static BlogModel RetrieveBlogById(BlogContext context, int id) { return context.Blogs.Where(x => x.Id == id).FirstOrDefault(); }