public IActionResult GetEbook(int id) { var ebook = _ebookManager.GetById(id); if (ebook == null) { return(NotFound()); } IndexUnit indexUnit = new IndexUnit() { Title = ebook.Title, Category = ebook.CategoryId, Author = ebook.Author, FileDate = ebook.PublicationYear.ToString(), Filename = ebook.Filename, Language = _languageManager.GetById(ebook.LanguageId).Name, Keywords = ebook.Keywords.Trim().Split(" ").ToList() }; return(Ok(indexUnit)); }