public int Add(string name, string description, string place, DateTime dateTime)
        {
            Event newEvent = new Event(name, description, place, dateTime);

            ObservableCollection.Add(newEvent);
            PersistencyService.SaveGenericAsJsonAsync(_observableCollection, "events.json");
            return(ObservableCollection[ObservableCollection.Count - 1].ID);
        }
 public void Remove(Event eventToBeRemoved)
 {
     ObservableCollection.Remove(eventToBeRemoved);
     PersistencyService.SaveGenericAsJsonAsync(_observableCollection, "events.json");
 }
 public void Add(string username, string password)
 {
     ObservableCollection.Add(new Account(username, password));
     PersistencyService.SaveGenericAsJsonAsync(_observableCollection, "accounts.json");
 }
 public void Remove(Account account)
 {
     _observableCollection.Remove(account);
     PersistencyService.SaveGenericAsJsonAsync(_observableCollection, "accounts.json");
 }
 private AccountCatalogSingleton()
 {
     PersistencyService.SaveGenericAsJsonAsync(new ObservableCollection <Account>(), "accounts.json");
 }