public StaffViewModel() { Title = "Staff Management"; StaffMembers = new ObservableCollection <StaffModel>(); LoadItemsCommand = new Command(async() => await ExecuteLoadItemsCommand()); MessagingCenter.Subscribe <NewStaffPage, StaffModel>(this, "AddStaff", async(obj, item) => { var newItem = item as StaffModel; StaffMembers.Add(newItem); await StaffService.AddItemAsync(newItem); }); MessagingCenter.Subscribe <StaffDetailPage, StaffModel>(this, "UpdateStaff", async(obj, item) => { var updatedItem = item as StaffModel; await StaffService.UpdateItemAsync(updatedItem); }); MessagingCenter.Subscribe <StaffDetailPage, StaffModel>(this, "DeleteStaff", async(obj, item) => { var deleteItem = item as StaffModel; await StaffService.DeleteItemAsync(deleteItem.StaffId); }); }