title: C# : inserting data from one database to another
body: <p>How can I add dynamic data from one database to another one?</p>
  
  <p>I am using the following code, it works fine for inserting static data but how can I make it add data dynamically into my database?</p>
  
  <p>I already connected to the source database and I can see all the tables</p>
  
  <pre><code>static void Main(string[] args)
  {
      try
      {
          var container = GetProphetApiContainerForRequest();
  
          var newContact = new Contact()
              {
                  Id = Guid.NewGuid(),             // ID is necessary for creation.
                  FirstName = "Doe ",               // For Example:FirstName = tableName.FirstName
                  LastName = "Joe",                //For Example:LastName= tableName.LastName
                  CreatedDate = DateTime.UtcNow,
                  Email = "xx@yyyy.com",          // For Example:Email = tableName.Email
                  BusinessPhone = "916 XXX XXXX",//For Example:BusinessPhone= tableName.PhoneNumber
              };
  
          // create
          container.AddToContacts(newContact);
          container.SaveChanges();
      }
      catch (Exception ex)
      {
          throw;
      }
  }
  </code></pre>