Created
October 30, 2012 19:43
-
-
Save wayne-o/3982531 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AdminController : Controller | |
{ | |
private readonly IRpository<Category> repository; | |
public AdminController(IRpository<Category> repository) | |
{ | |
this.repository = repository; | |
} | |
public ViewResult Categories() | |
{ | |
return View("Categories"); | |
} | |
[HttpGet] | |
public ActionResult CategoriesAdd() | |
{ | |
return View("Categories"); | |
} | |
[HttpPost] | |
[ActionName("Categories")] | |
public ActionResult CategoriesAdd(CategoriesAddViewModel viewModel) | |
{ | |
return RedirectToAction("Categories"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment