Prioritizing one column over the other column of the same table
I believe there is not much to improve in here.

If you really want to make a one call to sql server, then you can move this logic to sql procedure.

You can visually improve first query and use FirstOrDefault:

var myClassPkColumn = _context.MyClass.FirstOrDefault(x =&gt; x.PkColumn == reference);

if (myClassPkColumn != null)
{
    return new MyClass[] { myClassPkColumn };
}


If you know that your PkColumn is always less or equal 3 characters, then you can add if statement and skip first query completely in case your reference has bigger length.

if (reference?.Length &lt;= 3)
{
    // query by PkColumn column
}


If you want to combine two queries into one you can add this OrderBy:

var myClassResult = _context.MyClass
                    .Where(myClass =&gt; myClass.PkColumn.Equals(reference) ||
                        myClass.Description.Contains(reference))
                    .OrderBy(x =&gt; x.PkColumn == reference ? 0 : 1)
                    .Take(8)
                    .ToList();