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