private async void AddCategoryExecute() { if (NewCategory != null) { var category = new Category { Name = NewCategory.Name, Description = NewCategory.Description, ImageUrl = NewCategory.BackdropUrl, DateAdded = DateTime.Now, IsWatched = false, Keywords = NewCategory.KeywordsFormatted }; await FirebaseManager.Instance.AddCategory(category); Categories.Add(category); NewCategory = new CategoryViewModel(); } }
public async Task<bool> AddCategory (Category category) { var response = await _client.PushAsync (CategoriesName, category); return response.StatusCode == HttpStatusCode.OK; }