private async Task CreateNewCommandExecute()
 {
     using (var db = new NerContext())
     {
         db.Add(NewEstab);
         await db.SaveChangesAsync();
     }
     await LoadListCommandExecute();
 }
예제 #2
0
 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();
     });
 }