I receive the following error when trying to run the new project per the instruction in the Readme file.
1: querying Todos
2: Query failed: The action 'Todos' on controller 'BreezeSample' with return type 'System.Collections.Generic.List`1[[MyTasks.Api.Models.BreezeSampleTodoItem, MyTasks.Api, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]' cannot support querying. Ensure the type of the returned content is IEnumerable, IQueryable, or a generic form of either interface.
UPDATE:
I checked my event viewer, and see a SQL error that I've never seen before when trying to debug on my machine -
Login failed for user 'my-machine\user-name'. Reason: Failed to open the explicitly specified database. [CLIENT: ]
It seems that the database being generated by BreezeSamplesContext is inaccessible for some reason? It has been generated by code-first, but I can't query it (apparently).
UPDATE 2:
I've changed the default method to -
[HttpGet]
public IQueryable<BreezeSampleTodoItem> Todos()
{
System.Data.Entity.DbSet<BreezeSampleTodoItem> result = null;
try
{
result = _contextProvider.Context.Todos;
}
catch (Exception exc)
{
throw new Exception(exc.Message);
}
return result;
}
Although the Seed method works, and the database is dropped and repopulated with seed values, I get a response of 0 items in the 'result' above.