public IHttpActionResult GetDate(string releaseDate) { IEnumerable <Dvd> found = _repo.GetByYear(releaseDate); if (found == null) { return(NotFound()); } IEnumerable <JObject> output = DvdMapper.ToJsonList(found); return(Ok(output)); }
public IHttpActionResult SearchByReleaseYear(int year) { var dvd = repos.GetByYear(year); if (dvd == null) { return(NotFound()); } else { return(Ok(dvd)); } }
public List <Dvd> GetByRealeaseYear(int realeaseYear) { IDvdRepository repo = DvdRepositoryFactory.Create(); return(repo.GetByYear(realeaseYear)); }
public IHttpActionResult GetDvdsByYear(int year) { var data = dvdRepository.GetByYear(year); return(Content(HttpStatusCode.OK, data)); }