Answers for "linq select top 2"

C#
2

linq query select top 1 c#

imageName = (from soh in db.tblProductImages
             where soh.product_id == e.ProductId
             select soh.image_name).FirstOrDefault()
Posted by: Guest on June-04-2020
0

LINQ query to select top 5

var list = (from t in ctn.Items
           where t.DeliverySelection == true && t.Delivery.SentForDelivery == null
           orderby t.Delivery.SubmissionDate
           select t).Take(5);
Posted by: Guest on November-09-2021

C# Answers by Framework

Browse Popular Code Answers by Language