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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T21:39:30+00:00 2026-06-18T21:39:30+00:00

Firstly I would like to apologize to you all because I know that this

  • 0

Firstly I would like to apologize to you all because I know that this question has been asked a whole bunch of times. But I dont know much about MVC or .NET or Lambda expressions per se. I am working on a small project and I am stuck at the Lambda expression error as below
enter image description here

EDIT
Below is the controller Code

using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Entity;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using MVC4Trial.Models;
using Kendo.Mvc.UI;
using Kendo.Mvc.Extensions;

namespace MVC4Trial.Controllers
{
    public partial class CallTrackController : Controller
    {
        public ActionResult Index()
        {
            return View();
        }
        public ActionResult Remote_Data()
        {
            return View("AjaxBinding");
        }

        public ActionResult vwCallDetails([DataSourceRequest] DataSourceRequest request)
        {

            return Json(GetCallDetailsFn().ToDataSourceResult(request));
        }

        private static IEnumerable<CallDetails> GetCallDetailsFn()
        {
            var callData = new CallTrackClassDataContext();
            return callData.CallDetails.Select(calldetail => new CallDetails
            {
                CCCID = calldetail.CCCID,
                Mp3_Url = calldetail.Mp3_Url,
                Index = calldetail.Index,
                Target_Number = calldetail.Target_Number,
                Duration = calldetail.Duration,
                LocalTime = calldetail.LocalTime,
                Site_Name___Address = calldetail.Site_Name___Address,
                Ad_Source_Name = calldetail.Ad_Source_Name,
                Tracking_Number = calldetail.Tracking_Number,
                Caller_Number = calldetail.Caller_Number,
                Available_Feature = calldetail.Available_Feature


            });
        }


     }
}

I would like to learn how to fix this error. What am I missing here? Do I need to make any sort of changes on my Model/View/Any other file? Thanks for reading and helping.

  • 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-18T21:39:31+00:00Added an answer on June 18, 2026 at 9:39 pm

    There’s something wrong with Duration. It’s underlined in red, indicating that it doesn’t exist on the class, or some other issue is causing it to not be recognized. Since there’s an error here, the lambda expression doesn’t process properly and it’s only then that Visual Studio recognizes there error. Essentially, the reported error is masking the true problem. Fix Duration or remove it, and the lambda expression will be fine.

    For what it’s worth though, what you’re doing doesn’t make much sense. callData.CallDetails already returns an instance of CallDetails (or at least it should, or you should change the name), so using Select to return an instance of CallDetails populated from an instance of CallDetails is superfluous.

    UPDATE

    Sorry for not being more clear. My last comment really depends on what is exactly going on in code I can’t see. So there’s two possible scenarios:

    1) callData.CallDetails is an instance of CallDetails. If this is the case, using Select is a waste of time and code because all you’re doing is just converting one instance of CallDetails to another. Just doing return callData.CallDetails; would have the same effect.

    2) callData.CallDetails is not an instance of CallDetails. If this is the case, then you should simply rename the CallDetails member of callData to avoid the sort of confusion that prompted my comment in the first place.

    FWIW: If you really need to map some other type to an instance of CallDetails like this, you should look into AutoMapper. Writing this code is not only repetitive and time-consuming, but you also make yourself more prone to errors. For example, what if you later change the definition of CallDetails? You now got to track down every explicit mapping like this and change that as well, whereas with AutoMapper, you likely can just change the definition and be done.

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

Sidebar

Related Questions

Firstly I apologize if this is a question that has been asked many times.
Firstly, I know this [type of] question is frequently asked, so let me preface
Firstly I would like to accept that it is a homework question , but
Firstly, I do not have any malicious intent out of this question. I would
firstly I would like to say sorry if this is a repost, onto the
Firstly I would like to say that I am quite new to Spring (in
Firstly I would just like to thank everyone for reading this and answering my
Firstly, I would like to say that I have tested if my link to
Update 16th November 2012 I would like to raise this question again, offering with
Firstly I would say that I have read this post however I still have

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.