Hi @akhter hussain
You don't have SecId in your select new ItemMV()
, that's why you get the error.
var Itemlist = (from i in _context.ItemMasterFiles
join s in _context.Sections on i.SecId equals s.SecId
join c in _context.Catagories on i.Cid equals c.Cid
into ce
from sub in ce.DefaultIfEmpty()
where i.Packsize == "1" || i.Delid == null
select new ItemMV()
{
//******should add SecId here********//
CodeItem = i.CodeItem,
Descriptionitem = i.Descriptionitem,
Secnam = s.Secnam,
BaleSize = i.BaleSize,
Weight = i.Weight,
Cname = sub.Cname,
}).ToList();
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best regards,
Jason