public DVDResponse GetById(int id) { DVDResponse response = new DVDResponse(); var dvdById = _dvdRepo.GetById(id); if (dvdById == null) { response.Success = false; response.Message = "There are no DVDs with this id."; } else { response.Success = true; response.DVD = dvdById; } return(response); }
public IHttpActionResult Get(int id) { IDVDRepo repo = Factory.Create(); return(Ok(repo.GetById(id))); }