public ActionResult <IEnumerable <Movie> > Get() { try { return(Ok(_ms.Get())); } catch (Exception e) { return(BadRequest(e.Message)); }; }
protected async override Task OnInitializedAsync() { if (Id.HasValue) { var response = await MoviesService.Get(new IdRequest(Id.Value)); if (response.Ok) { _movie = response.Payload; SaveMovieRequest = new SaveMovieRequest { Id = _movie.Id, Image = _movie.Image, ReleaseDate = _movie.ReleaseDate, Title = _movie.Title }; } } }
public ActionResult <List <MoviesModel> > Get() { return(service.Get()); }