title: SQLite c# : How to save and retrieve custom object in sqlite BLOB datatype?
body: <p>There is a custom object(ex company) and list of custom object (ex employee) which needs to be saved in a BLOB datatype, Below is the piece of code I have tried without success. I have tried <code>DbType.Binary</code> but it did not workout. <br>
  <br>
  Below is the piece of insert query : <br></p>
  
  <pre><code>sql_cmd.Parameters.Add("@company", DbType.Byte); 
  sql_cmd.Parameters["@company"].Value = (Company)root.company;
  
  
  sql_cmd.Parameters.Add("@employees", DbType.Byte);
  sql_cmd.Parameters["@employees"].Value = ((List&lt; Employee &gt;))root.employeeList;
  </code></pre>
  
  <p>Exception :</p>
  
  <pre><code>System.FormatException was unhandled by user code.
  Message=Input string was not in a correct format.
  </code></pre>
  
  <p><br>
  Below is the associated classes
  <br></p>
  
  <pre><code> class Company
      {
          public string id { get; set; }
          public string name { get; set; }
          public List&lt;Package&gt; packages { get; set; }
          public string description { get; set; }
      }
  
   class Employee
      {
          public string id { get; set; }
          public string name { get; set; }
          public object description { get; set; }
          public Address address { get; set; }
          public Contact contact { get; set; }
          public string enterpriseId { get; set; }
          public object createdDate { get; set; }
          public object modifiedDate { get; set; }
  }
  </code></pre>