Ejemplo n.º 1
0
 public KeyVal Get(string key)
 {
     using (KeyValDataContext context = new KeyValDataContext(connectionString))
     {
         return(context.KeyVals.Find(key));
     }
 }
Ejemplo n.º 2
0
 public IEnumerable <KeyVal> List()
 {
     using (KeyValDataContext context = new KeyValDataContext(connectionString))
     {
         return((from keyVal in context.KeyVals
                 select keyVal)
                .ToArray());
     }
 }