private void SaveCategory() { if (SavedCategory != null) { var savedCat = _repository.Save(new List <IBaseModel> { SavedCategory }).First(); _categories.Add(savedCat); RaisePropertyChanged(() => Categories); RaisePropertyChanged(() => FilteredCategories); SavedCategoryName = ""; SavedCategoryColor = ""; CloseSaveCategoryAction?.Invoke(); } }
private void SaveTodo() { if (SavedTodoItem != null) { _repository.Save(new List <IBaseModel> { SavedTodoItem }); _categories = _repository.GetCategories(); RaisePropertyChanged(() => Categories); RaisePropertyChanged(() => FilteredCategories); SavedTodoDescription = ""; SavedTodoTitle = ""; SelectedCategory = null; CloseSaveCategoryAction?.Invoke(); } }