Hi you can do something like below programatically
, without creating early-bound classes.
using (StreamReader reader = new StreamReader("D://yourfileFolder//file.txt"))
{
string line;
while ((line = reader.ReadLine()) != null && line!=String.Empty)
{
var values = line.Split(','); //your data separator, it could be any character
Entity customEntity = new Entity("entityLogicalName");
//you should adjust the values according to the data-type on Dynamics CRM e.g
// customEntity ["revenue"] = new Money(values[0].ToString());
customEntity ["field1"] = values[0];
customEntity ["field2"] = values[1];
customEntity ["field3"] = values[2];
orgService.Create(customEntity);
}
}