public static Blog[] GetMsdnBlogs() { using (var db = new BloggingContext()) { return db.Blogs .Where(b => b.Url.Contains("msdn")) .OrderBy(b => b.Url) .ToArray(); } }
public static Blog[] GetBlogs() { using (var db = new BloggingContext()) { return db.Blogs .SqlQuery("SELECT * FROM dbo.wrong_table") .ToArray(); } }