public IActionResult Index(string sortOrder, string searchString) { string sort = String.IsNullOrEmpty(sortOrder) ? "name_asc" : sortOrder; string search = String.IsNullOrEmpty(searchString) ? "" : searchString; ViewData["CurrentSort"] = sort; ViewData["CurrentFilter"] = search; var cuisins = new CuisinRepo(db).getAll(sort, search); return(View(cuisins)); }
public IActionResult Delete(string id) { var cuisin = new CuisinRepo(db).get(id); return(View(cuisin)); }