Example #1
0
 public async static Task<List<PersonRecord>> GetPersonsAsync()
 {
     using (var db = new PersonRecordContext())
     {
         return await db.Persons.ToListAsync();
     }
 }
Example #2
0
 public async static Task AddPersonAsync(string value)
 {
     var per = CreatePersonFromString(value);
     using (var db = new PersonRecordContext())
     {
         db.Persons.Add(per);
         await db.SaveChangesAsync();
     }
 }