public async Task AddCategoryAsync() { string error = _dataValidation.CategoryDataValidation(NewCategory); if (error == null) { var service = new CategoriesService(); error = await service.AddCategory(NewCategory); } ShowMessageDialog(error); }