# First Row : Syntax

**URL:** <https://www.epiusers.help/t/first-row-syntax/64002>\
**Category:** Epicor ERP 10\
**Tags:** e10\
**Created:** [January 28, 2020, 4:12pm UTC](https://www.epiusers.help/t/first-row-syntax/64002 "2020-01-28T16:12:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![windowsmanager](https://www.epiusers.help/letter_avatar_proxy/v4/letter/w/7c8e57/32.png) [@windowsmanager](https://www.epiusers.help/u/windowsmanager)\
**Post date:** [January 28, 2020, 4:12pm UTC](https://www.epiusers.help/t/first-row-syntax/64002/1 "2020-01-28T16:12:54Z")

</div>

Does anyone knows how can I take the first row out this

foreach (var DBOrderHed\_iterator in (from DBOrderHed\_Row in Db.OrderRel  
where  
(int) DBOrderHed\_Row.OrderNum == (int) inOrderNumber  
select DBOrderHed\_Row)  
)

---

<div class="post-metadata">

**Author:** ![surendrapal](https://www.epiusers.help/user_avatar/www.epiusers.help/surendrapal/32/6162_2.png) [@surendrapal](https://www.epiusers.help/u/surendrapal)\
**Post date:** [January 28, 2020, 4:37pm UTC](https://www.epiusers.help/t/first-row-syntax/64002/2 "2020-01-28T16:37:52Z")

</div>

```cs

  var orderRelRow = Db.OrderRel.With(LockHint.NoLock).Where(row => row.OrderNum == inOrderNumber).FirstOrDefault();
if(orderRelRow != null)
{
}

```
