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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:12:23+00:00 2026-06-13T23:12:23+00:00

IRepositoryBase IQueryable<T> GetAll(Expression<Func<T, bool>> predicate = null, params Expression<Func<T, object>>[] includes); RepositoryBase public IQueryable<T>

  • 0

IRepositoryBase

IQueryable<T> GetAll(Expression<Func<T, bool>> predicate = null, params Expression<Func<T, object>>[] includes);

RepositoryBase

public IQueryable<T> GetAll([OptionalAttribute][DefaultParameterValueAttribute(null)]Expression<Func<T, bool>> predicate, params Expression<Func<T, object>>[] includes)
{
    var set = CreateSet().IncludeMultiple(includes);
    return (predicate == null) ? set : set.Where(predicate);      
}

IAccountService

IEnumerable<int> GetAllReferenceIds();

AccountService

public IEnumerable<int> GetAllReferenceIds()
{
    var accountOwners = _accountOwnerRepository.GetAll();
    return accountOwners.Select(m => m.ReferenceId).ToList();
}

AccountController

public ActionResult ReferenceIdPartial()
{

    ViewData["AccountOwners"] = accountOwnerService.GetAllReferenceIds();

    return PartialView();

}

MVC Partial View – DevExpress combobox MVC extension

settings.Properties.Columns.Add("ReferenceId", "Reference Id", Unit.Percentage(100));

Error: column ReferenceId Not found

I am sending a collection of int through GetReferenceIds().

Is there a way to call the columns from Controller? Something like AccountOwner(a=>a.ReferenceIds, select ReferenceIds)? I should be able to get the column name as well as the data.

  • 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-13T23:12:24+00:00Added an answer on June 13, 2026 at 11:12 pm

    This is a shot into the dark, I actually only understand your last sentence “I should be able to get the column name as well as the data” – and could imagine that if you bind a collection to a combobox (I don’t know the DevExpress combobox extension) the combobox control wants a collection of class objects with a property name/property value pair instead of only a collection of values ( int). So, without touching the AccountService you could try:

    public ActionResult ReferenceIdPartial()      
    {
        ViewData["AccountOwners"] = accountOwnerService.GetAllReferenceIds()
            .Select(i => new { ReferenceId = i });
    
        return PartialView();
    }
    

    ViewData["AccountOwners"] now would hold a collection of (anonymous) objects. Each object has one property called ReferenceId with a value i fetched from the Ids you returned from your service.

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

Sidebar

Related Questions

public interface IRepository<T>// : IDisposable where T : IEntity { IQueryable<T> GetAll(); void Save(T
Consider the following code: public abstract class RepositoryBase<T> where T : class { #region
I have the following code: public abstract class RepositoryBase<T, TId> : IRepository<T, TId> where
One of my base repository classes contains a method: public abstract class RepositoryBase<T, TDb>
I'm trying to define a generic class public abstract class RepositoryBase<TDatabase, TKey, T> :
Considering the following code public interface IEntity { int Id { get; set; }
I have something like this: public void Delete(T entity) { Context.DeleteObject(entity); Context.SaveChanges(); } I
I am always getting the error No parameterless constructor defined for this object. when
I'm using a RepositoryBase<T> base class as the foundation for my individual repositories (e.g.
Let's say I have a service interface that looks like this: public interface IFooService

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.