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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:04:08+00:00 2026-06-11T07:04:08+00:00

When Using LINQ to get information I use the following method var salt_water_disposals =

  • 0

When Using LINQ to get information I use the following method

var salt_water_disposals = _SaltWaterDisposals.SaltWaterDisposals.Select(sw => new SaltWaterModel
            {

                saltwater_ID = sw.SaltWaterDisposalID,
                lease = sw.Lease.LeaseName,
                field = sw.Lease.Field.Name.ToLower(),
                permitter_fluid = sw.PermittedFluids.Count == 0 ? "None" : sw.PermittedFluids.Aggregate("", (current, c) => current+c.Fluid.Name),
                max_gas_pressure = sw.MaxGasInjectionPressure,

            });

However when I run the code I get the following error because of the PermittedFluids:

LINQ to Entities does not recognize the method ‘System.String
Aggregate[PermittedFluid,String](System.Collections.Generic.IEnumerable1[FieldPro.Domain.Entities.PermittedFluid],
System.String,
System.Func
3[System.String,FieldPro.Domain.Entities.PermittedFluid,System.String])’
method, and this method cannot be translated into a store expression.

I have tried using it also as a ToString() but I get the same error.

Any Ideas?

Any Help would be appreciated.

  • 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-11T07:04:10+00:00Added an answer on June 11, 2026 at 7:04 am

    I fixed this by taking out the Aggregate call and calling it in my view, and changing the data type or permitter_fluid.

    So My model has:

    public System.Data.Objects.DataClasses.EntityCollection<FieldPro.Domain.Entities.PermittedFluid> permitter_fluid { get; set; }
    

    My Controller has:

    permitter_fluid = sw.PermittedFluids,
    

    and my view has (using a Html.Grid from MvCContrib):

    column.For(m => m.permitter_fluid.Aggregate("", (current, c) => current + c.Fluid.Name)).Named("Permitted Fluid");
    

    This solved my problem

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

Sidebar

Related Questions

I'm using LINQ to Get data from database table called table1 when using LINQ
I am trying to insert a record into a table using Linq but get
Using LINQ can I get the data from the table into the format shown
Im using LINQ over DataSet but just to get data from some tables, by
I'm using LINQ to SQL to get a search result of a FullTextSearch stored
How can I get the Nth row using Linq? both columns are text so
I am trying to get decimal value using LINQ in a MVC3 project. How
How do I get all of the columns using linq from this dictionary. Dictionary<int,
Is it possible to get all 7 days for a given date using linq
I get an InvalidCastException converting a linq entity list to a businessobject list using

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.