public IHttpActionResult GetAll()
        {
            IEnumerable <Dvd>     found  = _repo.GetAll();
            IEnumerable <JObject> output = DvdMapper.ToJsonList(found);

            return(Ok(output));
        }
Пример #2
0
        public IHttpActionResult GetAll()
        {
            IEnumerable <Dvd> dvds = _repo.GetAll();

            //var query = _repo.GetAll();


            /*foreach (var q in query)
             * {
             *  DvdView d = new DvdView();
             *  d.Title = q.Title;
             *  d.Director = q.Director;
             *  //if(q.RatingId == 1){d.RatingName = "G";}
             * d.RatingName = q.Rating.RatingName;
             *  d.ReleaseYear = q.ReleaseYear;
             *  d.DvdId = q.DvdId;
             *  dvds.Add(d);
             * }*/

            /*var query = from q in _repo.GetAll()
             *  select new
             *  {
             *      q.DvdId,
             *      q.Title,
             *      q.Director,
             *      q.ReleaseYear,
             *      q.Rating.RatingName
             *
             *  };*/
            return(Ok(dvds));
            //return Ok(_repo.GetAll());
        }
Пример #3
0
        public IHttpActionResult GetAll()
        {
            IEnumerable <Dvd> dvds = _repo.GetAll();

            /*var query = from q in _repo.GetAll()
             * select new
             * {
             *  q.DvdId,
             *  q.Title,
             *  q.Director,
             *  q.ReleaseYear,
             *  q.Rating.RatingName
             *
             * };*/
            return(Ok(dvds));
            //return Ok(_repo.GetAll());
        }
Пример #4
0
 public IHttpActionResult All()
 {
     return(Ok(_dvdRepository.GetAll()));
     // return Ok(DvdRepoMock.GetAll());
 }
Пример #5
0
 public IHttpActionResult GetAll()
 {
     return(Ok(_dvdRepository.GetAll()));
 }
Пример #6
0
 public List <Dvd> GetAll()
 {
     dvds = _dvdRepository.GetAll();
     return(dvds);
 }
Пример #7
0
 public IHttpActionResult GetAllDvds()
 {
     return(Ok(repo.GetAll()));
 }
Пример #8
0
        public List <Dvd> GetAll()
        {
            IDvdRepository repo = DvdRepositoryFactory.Create();

            return(repo.GetAll());
        }
Пример #9
0
 public IHttpActionResult All()
 {
     return(Ok(_repo.GetAll()));
 }
Пример #10
0
        public IHttpActionResult GetAll()
        {
            IDvdRepository DvdRepo = DvdRepositoryFactory.Create();

            return(Ok(DvdRepo.GetAll()));
        }