How to select entity many value?

I want to two column value in entity but I

dont selected.

How to solve select problem.

Try code:

var t1= dbcontext.Entities.Student.Select(c=>c.Number , a=>a.branchcode).

I error branchcode area.

But ı select number and branchcode.

1 answer

  • answered 2018-11-08 08:47 Khai Nguyen

    You can try this code:

    var t1 = dbcontext.Entities.Student.Select(c => new { Number = c.Number, Branchcode = c.Branchcode });