Esempio n. 1
0
        public async Task <ActionResult> NewCategory(VehicleCategoryPoco category)
        {
            if (ModelState.IsValid)
            {
                await categoryService.InsertCategoryAsync(category);

                return(RedirectToAction("Index"));
            }

            return(View());
        }
 /// <summary>
 /// Inserts new category.
 /// </summary>
 /// <param name="category">Category.</param>
 /// <returns>Updated database.</returns>
 public Task InsertCategoryAsync(VehicleCategoryPoco category)
 {
     return(categoryRepository.InsertCategoryAsync(category));
 }