Should I use and loop, or just a loop?
Use .Where extension method to filter the records you need:

foreach(ModelClass item in listObj.Where(x =&gt; x.id &lt; 0))
{
    // code to create a new Obj in the database
}