variable used like a type : <p>the error is coming in return statement " 'mydata' is a variable but is used like a type "
how to fix the error?        </p>

<pre><code>    [HttpGet]
    public JsonResult NewData()
    {
        List&lt;mydatasample&gt; mydata = new List&lt;mydatasample&gt;(); 
        mydata.Add(new mydatasample { bookName = "test1", publisherName = "yum3", publishYear = 2018 });
        mydata.Add(new mydatasample { bookName = "test1", publisherName = "yum3", publishYear = 2018 });
        mydata.Add(new mydatasample { bookName = "test2", publisherName = "yum3", publishYear = 2018 });
        mydata.Add(new mydatasample { bookName = "test1", publisherName = "yum3", publishYear = 2018 });
        mydata.Add(new mydatasample { bookName = "test1", publisherName = "yum3", publishYear = 2018 });
        mydata.Add(new mydatasample { bookName = "test1", publisherName = "yum3", publishYear = 2018 });
        mydata.Add(new mydatasample { bookName = "test1", publisherName = "yum3", publishYear = 2018 });
        mydata.Add(new mydatasample { bookName = "test1", publisherName = "yum3", publishYear = 2018 });
        mydata.Add(new mydatasample { bookName = "test1", publisherName = "yum3", publishYear = 2018 });
        mydata.Add(new mydatasample { bookName = "test1", publisherName = "yum3", publishYear = 2018 });



        return Json(new mydata { }, JsonRequestBehavior.AllowGet);
    }
</code></pre>
