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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T16:32:57+00:00 2026-05-31T16:32:57+00:00

I have an entity called File, I created a partial class with a property

  • 0

I have an entity called File, I created a partial class with a property on it.

I was able to use this property in regular constructors and other statements. But this property is not accepted in any linq statement.

I am getting the following exception.

Exception

The specified type member ‘FileStatus’ is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported.

Code

var fileEntry = from entry in context.ICFiles
                             where entry.FileName == FileName &&
                                   entry.FileStatus == FileStatus.InProgress
                             select entry;

fileEntry.First().FileStatus = FileStatus.Completed; 
// This is where I get the exception

Property Definition

public partial class ICFile
{
    [DataMemberAttribute()]
    public FileStatus FileStatus
    {
        get
        {
            return (FileStatus)this.Status;
        }
        set
        {
            this.Status = (int)value;
        }
    }
}
  • 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-31T16:32:58+00:00Added an answer on May 31, 2026 at 4:32 pm

    Right when I asked the question, I was left with the answer that @user1039947 has posted. However, that’s not the one I was expecting as an answer for this question.

    I was looking for the ability of Entity framework to utilize the Enum completely. But eventually I figured out that Linq to Entity can’t recognize the Enums (it usually recognizes the entities through an attribute starting with Edm, like EdmTypeAttribute, EntityPropertyAttribute etc.)

    Linq to Entity of Framework 4.0, has no way to accept the enums as entity object. However, the partial method serves us 80% what we might need from enum.

    I have posted a blog with more detail on this.

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

Sidebar

Related Questions

I have a db.BlobProperty property (called Icon) in my entity which contains an image
I have entity model like this (using EclipseLink and JPA 2.0): @Entity class A
I have an entity class that has a property with an underlying db column
I created an Entity Framework file. My database is called MyDB. My Entity Framework
I have entity called Customer and it has three properties: public class Customer {
I have an asp.net MVC application. There is an entity called File that it
I have an custom class for an Core Data entity, called 'Friends'. As I
I have an abstract entity called Block which contains two attributes: column and order
In my business model I have Entity class (IPoint interface ) that has a
I have an entity loaded by Hibernate (via EntityManager ): User u = em.load(User.class,

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.