public ActionResult <List <Brewery> > GetListBreweries(int userId = 0, bool isBrewer = false) { List <Brewery> breweries; if (userId == 0) { breweries = breweryDAO.GetBreweries(); } else if (isBrewer == false) { breweries = breweryDAO.GetBreweries(userId); } else { breweries = breweryDAO.GetBreweriesByBrewer(userId); } if (breweries != null) { return(Ok(breweries)); } else { return(BadRequest()); } }
public IActionResult GetBreweries() { return(new JsonResult(breweryDAO.GetBreweries())); }
public IEnumerable <Brewery> GetSearchResults(string searchString) { return(breweryDao.GetBreweries(searchString)); }
public List <Brewery> GetBreweries() { List <Brewery> breweryList = breweryDAO.GetBreweries(); return(breweryList); }