title: Entity Framework Core ExecuteSqlCommand delete with SQLite does not work
body: <p>I have the following model:</p>
  
  <pre><code>public class LogData
  {
      public Guid ID { get; set; }
      public string Name { get; set; }
  }
  </code></pre>
  
  <p>I use <em>Entity Framework Core</em> to save those models to an <em>SQLite</em> database, it works well.</p>
  
  <p>I need to delete from the data (it is dynamic,  I can't use objects), so I use the following command:</p>
  
  <pre><code>string command="DELETE FROM LogData WHERE ID IN ('ea53b72a-4ab2-4f88-8f1d-0f96baa7cac7')";
  context.Database.ExecuteSQLCommand(command);
  </code></pre>
  
  <p>According to the SQLite <a href="https://www.sqlite.org/lang_delete.html" rel="nofollow noreferrer">syntax</a>, it is valid.</p>
  
  <p>Unfortunately, as a result I get back 0, so no row was affected.
  When I remove the <code>WHERE</code> condition, <em>it deletes the contents of the table</em>.</p>
  
  <p>I have a guessing that as the key column is a <code>Guid</code> and it is stored as a <code>BLOB</code>, the plain SQLite engine can't find it.</p>
  
  <p>So I tried to alter the command to this:</p>
  
  <pre><code>string command="DELETE FROM LogData WHERE HEX(ID) IN ('ea53b72a-4ab2-4f88-8f1d-0f96baa7cac7')";
  context.Database.ExecuteSqlCommand(command);
  </code></pre>
  
  <p>Also tried this:</p>
  
  <pre><code>string command="DELETE FROM AuditLog WHERE HEX(ID) = 'ea53b72a-4ab2-4f88-8f1d-0f96baa7cac7'";
  context.Database.ExecuteSqlCommand(command);
  </code></pre>
  
  <p>This, too:</p>
  
  <pre><code>string command="DELETE FROM AuditLog WHERE ID = 'ea53b72a-4ab2-4f88-8f1d-0f96baa7cac7'";
  context.Database.ExecuteSqlCommand(command);
  </code></pre>
  
  <p>None of those helped.</p>
  
  <p>What should I do about this?</p>