I have a simple code.
public IHttpActionResult Get()
{
using (var db = new AppDBContext())
{
var task = (from act in db.Activities select act);
return Ok(task.ToList());
}
}
When I am debugging I am getting Enumeration yielded no results
but there is 200 records when i execute it in database.
I was doing silly mistake.
My wrong code
I thought
DefaultConnection
is a connection string. but when i changed it to my databasenameTaskFiveDB4
every thing is fine now.Correct code