private async Task <bool> CanSaveCategoryAsync() { if (Category == null) { return(false); } if (Category.CategoryName == "" || Category.CategoryName == null) { return(false); } if (States.Count == 0) { return(false); } if (States.FirstOrDefault(x => x.StateName == "") != null) { return(false); } if (!CanCreateState()) { return(false); } return(await FirebaseService.IsCategoryNameAwailableAsync(Category)); }
private async Task <bool> CanSetCategoryNameAsync() { if (Category.CategoryName == "" || Category.CategoryName == null) { return(false); } return(await FirebaseService.IsCategoryNameAwailableAsync(Category)); }