Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8991547
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:45:13+00:00 2026-06-15T22:45:13+00:00

I receive the following error when trying to run the new project per the

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T22:45:14+00:00Added an answer on June 15, 2026 at 10:45 pm

    UPDATE: December 15

    The critical piece of information … the reason for the problem … is the use of the pre-release SPA template.

    That template is not the same as the MVC 4 Web API or Empty templates that are described in the Breeze documentation

    The SPA Template and the MVC update include the beginnings of ASP.NET Web API support for OData queries. Their stab at OData conflicts with Breeze; the two forces are wrestling for ownership of the OData query. Wish we could use theirs but it is missing essential features such as support for $select and $expand.

    Fortunately, it is easy to disable the MS version so that Breeze prevails. Open App_Start/WebApiConfig.cs file and delete or comment out the following:

    config.EnableQuerySupport(); // conflicts with Breeze's ODataActionFilter
    

    The misleading error about “return type” should disappear and you should be back in business.

    Note that taking this step turns off the MS Web API OData filter for the entire site. We have it on our backlog to update the Breeze ODataActionFilterAttribute so that it disables the MS Web API OData handling for the Breeze controller only. We hadn’t bothered yet because the SPA template remains unofficial at this time. For the nonce … you can’t mix Breeze and Web API OData queries in the same site … unless you’re prepared to do the per-controller filter cleanup yourself.

    We have a Breeze version of the new SPA Template working and almost ready to release. I’ll be writing about it shortly and will update this answer with a link.

    Below is my previous answer which I preserve mostly because (a) it describes how to diagnose a problem and (b) is the context for the comment chain.


    Let’s start over and see if we can diagnose. Close all Visual Studio sessions (that should stop IIS Express). Launch a fresh VS session. Create an MVC4 Web Api application in VS 2012. Add the Breeze.MVC4WebApiClientSample NuGet package. Run it (F5). Still having trouble?

    If so, let’s update the controller method with a new line like this:

    [HttpGet]
    public IQueryable Todos() {
        var items = _contextProvider.Context.Todos.ToList(); // test the query
        return _contextProvider.Context.Todos;
    }
    

    Put a breakpoint on the var items ... line and re-run with the debugger (F5). Step into that line. Did it throw (not good but interesting)? If not, how many items did you get? Zero? You should have 6.

    If you can’t get past this point, I don’t think this is a Breeze problem. Breeze hasn’t done anything yet. I’d be looking for something unexpected in your environment.

    Let us know how it stands when you get to this point; if still stuck we’ll be ready for next steps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I receive the following error when trying to run my ASP.NET MVC application: The
I receive the following error when running a new compass project in OSX 10.7.3.
I'm receiving the following error when trying to run an ASP.NET MVC 3 project:
When trying to run my code, I receive the following error: CS0234: The type
I receive the following error when trying to run the app on my device.
i receive the following error when trying to implement auto-complete based on edismax type.
I'm trying to run the following code but unfortunately facing Error problems package jskypeexample;
I receive the following error when I try to run my code: lua:readFile.lua:7: attempt
I receive this error when trying to run the client. The type 'StringPro.IMyString' is
I am trying to initialize NSDictionary but it gives me following error: Program received

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.