title: C# Kendo issues - How can ı show my grid?
body: <p>I am using KendoUI but didnt show my grid. I'm getting the data, ı want to take my books on the server side and show them on my page. I wrote the following codes for this. But my books are not listed in Grid on my page but I can't show it in grid form on my page. Why? Here is my code:</p>
  <p>Controller Page:</p>
  <pre><code>using Kendo.Mvc.Extensions;
  using Kendo.Mvc.UI;
  using Microsoft.AspNetCore.Mvc;
  using TelerikBookProject.Data;
  using TelerikBookProject.Models;
  
  namespace myBookProject.Controllers
  {
  public class BookController : Controller
  {
      private readonly AppDbContext _db;
  
      public BookController(AppDbContext db)
      {
          _db = db;
      }
  
      public IActionResult Index([DataSourceRequest] DataSourceRequest request)
      {
          IEnumerable&lt;BookModel&gt; result = new List&lt;BookModel&gt;();
          result = _db.BookModels;
          return View(result);
      }
      //public IActionResult IndexView()
      //{
      //    IEnumerable&lt;BookModel&gt; obj = _db.BookModels;
      //    return View(obj);
      //}
      public IActionResult IndexView()
      {
          return View();
      }
  
    
  
      //GET
      public IActionResult Create()
      {
  
          return View();
  
      }
      //POST
      [HttpPost]
      [ValidateAntiForgeryToken]
      public IActionResult Create(BookModel obj)
      {
          if (ModelState.IsValid)
          {
              _db.BookModels.Add(obj);
              _db.SaveChanges();
              TempData[&quot;success&quot;] = &quot;Kitap eklendi.&quot;;
              return RedirectToAction(&quot;Index&quot;);
          }
          return View(obj);
      }
      //GET
      public IActionResult Update()
      {
  
          return View();
  
      }
      //POST
      [HttpPost]
      [ValidateAntiForgeryToken]
      public IActionResult Update(BookModel obj)
      {
          if (ModelState.IsValid)
          {
              _db.BookModels.Update(obj);
              _db.SaveChanges();
              TempData[&quot;success&quot;] = &quot;Kitap güncellendi.&quot;;
              return RedirectToAction(&quot;Index&quot;);
          }
          return View(obj);
      }
  
      //GET
      public IActionResult Delete(int? id)
      {
          if (id == null || id == 0)
          {
              return NotFound();
          }
          var categoryFromDb = _db.BookModels.Find(id);
  
          if (categoryFromDb == null)
          {
              return NotFound();
          }
  
          return View(categoryFromDb);
      }
      //POST
      [HttpPost, ActionName(&quot;Delete&quot;)]
      [ValidateAntiForgeryToken]
      public IActionResult DeletePOST(int? id)
      {
          var obj = _db.BookModels.Find(id);
          if (obj == null)
          {
              return NotFound();
          }
  
          _db.BookModels.Remove(obj);
          _db.SaveChanges();
          TempData[&quot;success&quot;] = &quot;Kitap silindi.&quot;;
          return RedirectToAction(&quot;Index&quot;);
      }
  }
  }
  </code></pre>
  <p>Index.cshtml:</p>
  <pre><code>@{
  ViewData[&quot;Title&quot;] = &quot;Kitaplarım&quot;;
  
  }
  @addTagHelper *, Kendo.Mvc
  @using Kendo.Mvc.UI
  
  &lt;div class=&quot;row&quot;&gt;
      &lt;div class=&quot;col-12&quot;&gt;
  
          &lt;ol class=&quot;breadcrumb&quot;&gt;
              &lt;li class=&quot;breadcrumb-item&quot;&gt;
              TelerikBookProject
              &lt;/li&gt;
              &lt;li class=&quot;breadcrumb-item active&quot;&gt;&lt;strong&gt; Kitaplarım&lt;/strong&gt;&lt;/li&gt;
          &lt;/ol&gt;
  
      &lt;/div&gt;
  &lt;/div&gt;
  
  
  
  &lt;div class=&quot;row&quot;&gt;
      &lt;div class=&quot;col-12&quot;&gt;
          &lt;div class=&quot;w-100&quot;&gt;
              @(
                  Html.Kendo().Grid&lt;TelerikBookProject.Models.BookModel&gt;
                          ().Name(&quot;Grid&quot;).Columns(columns =&gt;
                          {
                          columns.Bound(c =&gt; c.BookTitle).Title(&quot;Kitap Adı&quot;).Width(450);
                          columns.Bound(c =&gt; c.BookDescription).Title(&quot;Kitap 
  Açıklaması&quot;).Width(450);
                          columns.Bound(c =&gt; c.bookPage).Title(&quot;Sayfa Sayısı&quot;).Width(450);
                      }).DataSource(datasource =&gt; datasource.Ajax().Read(read =&gt; 
  read.Action(&quot;Index&quot;, &quot;Book&quot;))))
      &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <p>Model.cs:</p>
  <pre><code>using System.ComponentModel.DataAnnotations;
  
  namespace TelerikBookProject.Models
  {
      public class BookModel
      {
          [Key]
          public int bookId  { get; set; }
          [Required]
          public string BookTitle { get; set; }
          public string BookDescription { get; set; }
          public int bookPage { get; set; }
          public DateTime CreatedTime { get; set; } = DateTime.Now;
      }
  
  }
  </code></pre>
  <p>and AppDbContext.cs:</p>
  <pre><code>using Microsoft.EntityFrameworkCore;
  using TelerikBookProject.Models;
  
  namespace TelerikBookProject.Data
  {
      public class AppDbContext : DbContext
      {
          public AppDbContext(DbContextOptions&lt;AppDbContext&gt; options) : base(options)
          {
          }
  
          public DbSet&lt;BookModel&gt; BookModels { get; set; }
          public object BooksModels { get; internal set; }
      }
  }
  </code></pre>