private async Task CreateNewCommandExecute() { using (var db = new NerContext()) { db.Add(NewEstab); await db.SaveChangesAsync(); } await LoadListCommandExecute(); }
public AddNewBusinessViewModel() { AddNewBusinessCommand = new Command(() => { using (var db = new NerContext()) { db.Add(NewBusiness); db.SaveChanges(); } }); RefreshBusinessListCommand = new Command(async() => { await LoadBusinesses(); }); LoadBusinessListCommand = new Command(async() => { await LoadBusinesses(); }); }