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