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

  • Home
  • SEARCH
  • 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 8388853
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:33:46+00:00 2026-06-09T18:33:46+00:00

I’m trying to create a query object that contains information from 3 different entities.

  • 0

I’m trying to create a query object that contains information from 3 different entities. When the query executes, it tells me an EntityServerException was unhandled. I’m using a DTO for specific columns to be pulled. Here’s my basic DTO:

public class LeadRestrictionsDto : BasicModelBase
{
    private Guid _userId;
    private Guid _leadId;
    private string _restrictionDescription;
    private DateTime? _modified;

    [Key]
    public Guid UserId
    {
        get { return _userId; }
        set { SetValueAndNotify(() => UserId, ref _userId, value); }
    }

    public Guid LeadId
    {
        get { return _leadId; }
        set { SetValueAndNotify(() => LeadId, ref _leadId, value); }
    }

    public string RestrictionDescription
    {
        get { return _restrictionDescription; }
        set { SetValueAndNotify(() => RestrictionDescription, ref _restrictionDescription, value); }
    }

    public DateTime? Modified
    {
        get { return _modified; }
        set { SetValueAndNotify(() => Modified, ref _modified, value); }
    }
}

And here is the query I am trying to write that accepts a guid for a parameter type:

  public List<LeadRestrictionsDto> GetLeadRestrictionListingNow(Guid id)
  {

      IEnumerable<LeadRestrictionsDto> restrictions = from user in Manager.Users
                         join lead in Manager.Leads on user.UserId equals lead.OriginalOwnerId
                         join restriction in Manager.UserRestrictionListings on user.UserId equals restriction.UserId
                         where user.UserId == id
                         select new LeadRestrictionsDto
                                    {
                                        Modified = restriction.Modified,
                                        RestrictionDescription = restriction.Description,
                                        UserId = user.UserId,
                                        LeadId = lead.LeadId
                                    };

      List<LeadRestrictionsDto> userRestiction = restrictions.ToList(); //Exception occurs here
      return userRestiction;
  }

Here is the exact exception I get:

Unable to locate type: System.Linq.IQueryable`1[[Prime.Library.Repository.LeadRestrictionsDto, Prime.Library, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089. Check that the assembly holding this type is available in the bin/exe folder. Also check that both your assemblies and DevForce assemblies have the expected version number on both client and server.

It almost seems as if it’s trying to find my Dto in my model.edmx? Sorry if that sounds ignorant. Does anyone have an idea why I’m getting this exception? I have played with this query in LINQPad and it pulls data back with no issues.

  • 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-09T18:33:47+00:00Added an answer on June 9, 2026 at 6:33 pm

    I guess it had something to do with our server not being updated, but I was able to get around it with returning an anonymous type like so:

      public List<LeadRestrictionsDto> GetLeadRestrictionListingNow(Guid id)
      {
    
          var restrictions = from user in Manager.Users
                             join lead in Manager.Leads on user.UserId equals lead.OriginalOwnerId
                             join restriction in Manager.UserRestrictionListings on user.UserId equals restriction.UserId
                             where user.UserId == id && (restriction.RestrictionId == 100 || restriction.RestrictionId == 200) && restriction.Active == true
                             select new 
                                        {
                                            Modified = restriction.Modified,
                                            RestrictionDescription = restriction.Description,
                                            UserId = user.UserId,
                                            LeadId = lead.LeadId,
                                            FirstName = lead.FirstName,
                                            Created = lead.Created,
                                            LastName = lead.LastName
    
                                        };
    
    
          return restrictions.ToList().Select(x=>new LeadRestrictionsDto()
                                            {
                                                Modified = x.Modified,
                                                RestrictionDescription =  x.RestrictionDescription,
                                                UserId = x.UserId,
                                                LeadId = x.LeadId,
                                                FirstName = x.FirstName,
                                                Created = x.Created,
                                                LastName = x.LastName
                                            }).ToList();
    
    
      }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create an if statement in PHP that prevents a single post
Basically, what I'm trying to create is a page of div tags, each has
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have a view passing on information from a database: def serve_article(request, id): served_article
I am trying to understand how to use SyndicationItem to display feed which is
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function

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.