i have model, in model such method
public Pages GetPage(int? id)
{
return _dataContext.Pages.First(p => p.id == id);
}
if i pass whong parameter (like 123333-no record it database), it throw exception
Sequence contains no elements
can you suggest correct code version, or simply use try\catch?