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 6345521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:50:21+00:00 2026-05-24T20:50:21+00:00

I am using the Entity Framework with MySQL, and every table has a ID

  • 0

I am using the Entity Framework with MySQL, and every table has a ID column that is of type CHAR(36). In the EDMX file they are all of type System.Guid, and the SSDL xml looks like:

<EntityType Name="Accounts">
  <Key>
    <PropertyRef Name="ID" />
  </Key>
  <Property Name="ID" Type="guid" Nullable="false" />
  ...

When I try to use any method (Single, Where, Any, etc), it throws an InvalidOperationException stating that the sequence contains no elements. Here’s the weird part, if I expand the results view in the debugger, it does show the elements. The GUID values are the same, so it should be returning exactly one element. I have included a picture below (right click save as to see larger), but can anyone explain what is going on here? The GUID’s do match:

(method argument) accountID: 
{7767402f-9b29-4026-b40d-6eb991748f8c}
(should match) element in results view:
{7767402f-9b29-4026-b40d-6eb991748f8c}

enter image description here

  • 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-05-24T20:50:22+00:00Added an answer on May 24, 2026 at 8:50 pm

    My bet is that it’s a bug in the MySQL connector and that it has to do with how the GUID is stored in the DB. For some reason the comparison is not working. I think you should use BINARY(16) instead of CHAR(36).

    Check out the answer to this question: Storing MySQL GUID/UUIDs

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

Sidebar

Related Questions

I'm using Entity Framework in my project, and I have the problem that, once
I'm using Entity Framework to access my MySQL database. The model was generated using
I am trying use MySql and Entity Framework, using Connector/Net 6.1 with this as
I am using Linq using Entity Framework to query MySQL Database as below -
I'm using Entity Framework with MySQL and I can't get the right query execution.
We are getting a SecurityException when using Entity framework on godaddy. The entity has
Has anyone here used MySQL with the entity framework 4.0 and stored procedures? When
I'm currently developing an app using Entity Framework 4.1 and MySQL. I want to
Using Entity Framework, I suddenly get this strange error after publishing my asp.net mvc
I'm using Entity Framework O/R mapper from Microsoft and using entity classes (generated classes

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.