public async Task <IActionResult> GetShow(int id) { var show = await showsRepository.GetShowById(id); if (show != null) { return(Ok(show)); } return(BadRequest()); }
public static bool UpdateShow(int id, string name, int price, string description) { Show currentShow = ShowsRepository.GetShowById(id); if (currentShow != null) { currentShow.Name = name; currentShow.Price = price; currentShow.Description = description; return(ShowsRepository.UpdateShow(currentShow)); } return(false); }
public static Show GetShowById(int id) { return(ShowsRepository.GetShowById(id)); }