예제 #1
0
 public static List<usuario> getAll()
 {
     using (mf0493_e3Entities db = new mf0493_e3Entities())
     {
         var data = from usr in db.usuarios
                    select usr;
         return data.ToList();
     }
 }
예제 #2
0
 public static usuario getUsuario(string username)
 {
     using (mf0493_e3Entities db = new mf0493_e3Entities())
     {
         var data = from usr in db.usuarios
                    where usr.username == username
                    select usr;
         return data.First();
     }
 }