title: CRM v9 - Delete records based on ID from CRM Entity using C# Code
body: <p>I am using CRM version 9.0 and I want to delete all records with same ID in CRM through C#.</p>
  
  <p>I want to achieve something like this (I am giving a SQL Query example just for reference purpose)</p>
  
  <pre><code>Delete from entityName where id = @id
  </code></pre>
  
  <p>Currently, I am creating records in CRM through my C# code using below </p>
  
  <pre><code>dictionary.Add("code", new CrmDataTypeWrapper(code, CrmFieldType.Raw));
  dictionary.Add("id", new CrmDataTypeWrapper(id, CrmFieldType.Raw));
  Guid EvntId = _client.CrmInterface.CreateNewRecord("entityname", dictionary, "", false, new System.Guid());
  </code></pre>
  
  <p>Now I want to write a code block before this logic which will delete all the records if they exist of the passed ID.</p>