Sample Code/MovieHunter.API/Controllers/MoviesController.cs
/// <summary>
/// Retrieves all movies from the repository
/// </summary>
/// <returns></returns>
/// <example>GET api/movies</example>
Retrieves all movies from the repository
Retrieves all movies from the repository
[EnableQuery]
        [ResponseType(typeof(Movie))]
        public IHttpActionResult Get()
        {
            try
            {
                var movieRepository = new MovieRepository();
                return Ok(movieRepository.Retrieve().AsQueryable());
            }
            catch (Exception ex)
            {
                return InternalServerError(ex);
            }
        }
[ EnableQuery ] [ ResponseType ( typeof ( Movie ) ) ] public IHttpActionResult Get ( ) { try { var movieRepository = new MovieRepository ( ) ; return Ok ( movieRepository . Retrieve ( ) . AsQueryable ( ) ) ; } catch ( Exception ex ) { return InternalServerError ( ex ) ; } }
Retrieves all movies from the repository
Retrieves all movies from the repository
None
example
None