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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T01:21:01+00:00 2026-05-31T01:21:01+00:00

Please can somebody help me convert this MySQL query in to Entity Framework? Im

  • 0

Please can somebody help me convert this MySQL query in to Entity Framework?
Im using that in an ASP .NET project but I only know how to do basic queries in Entity Framework. This seems way too complicated and I cant find a working solution since many hours now…

 $rs = mysql_query("SELECT barcode,latitude,longitude,date_time,location_name 
                    FROM sDetails
                    JOIN users on (users.id=sDetails.UserId)  
                    WHERE  (latitude and longitude is not null) 
                       and (latitude <> 100000 and longitude <> 100000)
               and id='$UserId'
            ORDER BY date_time desc");
  • 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-31T01:21:03+00:00Added an answer on May 31, 2026 at 1:21 am

    Assuming you have generated an Entity Framework model from the database you should be able to do something like (c# example):

     var q = context.Details.Where( d => d.UserId = "$UserID" ).
                 Where( d => d.latitude.HasValue && d.latitude != 100000 && .. etc ).
                 OrderByDescending( d => d.date_time ).
                 Select( d => new {d.barcode, d.latitude, d.longitude, etc ... };
    

    I’m not sure why you have a join since you’re not selecting anything from the users tables.

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

Sidebar

Related Questions

I'm trying to optimize this mysql query using EXPLAIN. Can somebody please help me
Can somebody please help me with this mail script. I'm simply trying to send
Can somebody help me construct this regular expression, please... Given the following strings... "April
Can somebody please help me to write a DeepCopy routine for this matrix class
Can somebody help me please, I have this code : $('childcat').setHTML('Loading...'); I would like
can someboody please help me convert these strings/ints into a usable font thing? it
Can somebody please help me understand why my custom JComponent 'Bar', only displays when
Can somebody help me? please i really need to parse at least google. i
Can somebody help me understand how this pointed corner was actually generated in css
can somebody help me select the url from this XML document where the ID

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.