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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T00:59:13+00:00 2026-06-10T00:59:13+00:00

i have a mapped-class like this: [Table(MyTable)] class MyClass { //properties; id, name, etc…

  • 0

i have a mapped-class like this:

[Table("MyTable")]
class MyClass         
{   
        //properties; id, name, etc...

        private string _queuedToWHTime = string.Empty;
        [Column("QueuedToWHTime")]
        public string QueuedToWHTime
        {
            get { return _queuedToWHTime; }
            set { _queuedToWHTime = value; }
        }

        public DateTime? QueuedToWHTime_DateTime
        {
            get
            {
                if (!string.IsNullOrWhiteSpace(_queuedToWHTime))
                {
                    return Convert.ToDateTime(_queuedToWHTime);
                }
                return null;
            }
        }
}

and a table (MyTable):

CREATE TABLE webnews_in
(
Id                INT NOT NULL auto_increment,
QueuedToWHTime    VARCHAR (50) NULL
...
PRIMARY KEY (Id)
);

when i trying to query like this:

var searchRslt=(from m in queryableNews
    orderby m.QueuedToWHTime_DateTime descending
    select m).ToList();

I got a NotSupportedException:The specified type member ‘QueuedToWHTime_DateTime’ is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported.

  • 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-10T00:59:15+00:00Added an answer on June 10, 2026 at 12:59 am

    You cannot query with EF on custom properties. The custom property cannot be translated in SQL.

    You can do this to force the orderby to be done ‘in-memory’.

    var searchRslt = queryableNews
        .AsEnumerable()
        .OrderBy(m => m.QueuedToWHTime_DateTime)
        .ToList();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a table like this one: id | name | score mapped to
I have an entity mapped as following: @Entity @Table(name = Groups) @IdClass(value = GroupId.class)
I have an entity that is mapped with a <join> element like this: <class
Having a bag mapped like this: <bag name=Addresses table=address cascade=all-delete-orphan> <key column=employee/> <element column=address/>
I have a class mapped with a table, in my case in a declarative
I have a class that is mapped to a table using NHibernate. The problem
I have a database table that looks like this: CREATE TABLE IF NOT EXISTS
let's say i have this classes which are being mapped to SQLServer: class Statistic
I have a tablestructure like this: Table entity ( otherEntity_id int // primarykey id
For example I have one class mapped to a table in first database and

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.