title: Update multiple records using dapper after select by uniqueidentifier
body: <p>I have number of records that I have loaded from database and I want to update set couple values before I return them. The only main requirement I do not want multiple commands updating each record one by one.</p>
  
  <p>Please note my ids are GUIDs(uniqueidentifier)</p>
  
  <p>so far I have my code as </p>
  
  <pre><code>public IEnumerable&lt;Person&gt; GetUnprocessedPeople(int batchSize)
      {
          List&lt;Queue_ImportQueue&gt; list;
          using (IDbConnection db = OpenedConnection)
          {
              string peopleList = $"SELECT TOP({batchSize}) * FROM [dbo].[Person]";
  
              list = db.Query&lt;Person&gt;(peopleList).ToList();
              using (IDbTransaction transactionScope = db.BeginTransaction(IsolationLevel.Serializable))
              {
                  string updateQuery = $"UPDATE [dbo].[Person] SET Created = GETDATE() WHERE Id ='@ids'";
  
                  try
                  {
                      db.Execute(updateQuery, new { Id = list.Select(x =&gt; x.Id) }, transactionScope);
                      transactionScope.Commit();
                  }
                  catch (Exception ex)
                  {
                      transactionScope.Rollback();
                      throw;
                  }
              }
          }
          return list;
      }
  </code></pre>