public IActionResult Index(string sortOrder, string searchString) { string sort = String.IsNullOrEmpty(sortOrder) ? "title_asc" : sortOrder; string search = String.IsNullOrEmpty(searchString) ? "" : searchString; ViewData["CurrentSort"] = sort; ViewData["CurrentFilter"] = search; var drinks = new DrinksRepo(db).GetAll(sort, search); return(View(drinks)); }
public ManageSellsForm() { InitializeComponent(); this.dr = new DrinksRepo(); this.sk = new SnacksRepo(); }