public IHttpActionResult GetAll() { IEnumerable <Dvd> found = _repo.GetAll(); IEnumerable <JObject> output = DvdMapper.ToJsonList(found); return(Ok(output)); }
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()); }
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()); }
public IHttpActionResult All() { return(Ok(_dvdRepository.GetAll())); // return Ok(DvdRepoMock.GetAll()); }
public IHttpActionResult GetAll() { return(Ok(_dvdRepository.GetAll())); }
public List <Dvd> GetAll() { dvds = _dvdRepository.GetAll(); return(dvds); }
public IHttpActionResult GetAllDvds() { return(Ok(repo.GetAll())); }
public List <Dvd> GetAll() { IDvdRepository repo = DvdRepositoryFactory.Create(); return(repo.GetAll()); }
public IHttpActionResult All() { return(Ok(_repo.GetAll())); }
public IHttpActionResult GetAll() { IDvdRepository DvdRepo = DvdRepositoryFactory.Create(); return(Ok(DvdRepo.GetAll())); }