1

I have created an .EDMX file from my database using Entity Framework 6.1.3. Now my code is not compiling with error:

Cannot convert lambda expression to type 'string' because it is not a delegate type.

FEED_DETAIL is not compiling as I have in MASTER_FEED class as:

public virtual ICollection<FEED_DETAIL> FEED_DETAIL { get; set; }

public MASTER_FEED GetMasterFeed(string strSnapshotId)
{
    IList<MASTER_FEED> data=_objDbContext.MASTER_FEED.Include(rw =>rw.FEED_DETAIL).Where(x => x.MAST_SNAPSHOT_RECORD_ID.Equals(strSnapshotId));

    return null;
}

Any help please.

5
  • 1
    Probably error occurs where you call GetMasterFeed method. not it ? Commented Jan 14, 2016 at 7:35
  • 1
    @tchelidze, when I am trying to create a function GetMasterFeed and providing body with above code. Commented Jan 14, 2016 at 7:36
  • 3
    try adding using System.Data.Entity; Commented Jan 14, 2016 at 7:39
  • 1
    thanks @tchelidze...it works :) Commented Jan 14, 2016 at 7:43
  • 1
    Glad if it helped. Please mark my answer as accepted )) Commented Jan 14, 2016 at 7:44

1 Answer 1

3

Try adding

using System.Data.Entity;
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.