public IHttpActionResult GetAllFavorites() { LiquorService liquorService = new LiquorService(); var faveliquors = liquorService.GetFaveLiquors(); return(Ok(faveliquors)); }
public IHttpActionResult GetLiquorById(int id) { LiquorService liquorService = new LiquorService(); var liquors = liquorService.GetLiquorById(id); return(Ok(liquors)); }
public IHttpActionResult GetAll() { LiquorService liquorService = new LiquorService(); var liquors = liquorService.GetLiquors(); return(Ok(liquors)); }
public IHttpActionResult Delete(int id) { var service = new LiquorService(); if (!service.DeleteLiquor(id)) { return(InternalServerError()); } return(Ok()); }
public IHttpActionResult Put(LiquorEdit liquor) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var service = new LiquorService(); if (!service.UpdateLiquor(liquor)) { return(InternalServerError()); } return(Ok()); }