Hi I am trying to learn Linq, so I am not sure if this can be done.
I am working on an import project So I decided to import data using DataSets.
My challenge at this point: Having 2 DataTables with different schema, one of which contains my destination schema, and the other one my source schema.
What I need to do is perform some column matching where I can identify my source columns that are "somewhat similar" to my destination columns. I am looking for something at this point where if any part of destination column name is contained in the source, it's a possible match I don't know of any way to determine likeliness.
For example source [firstname, lastname, address] - > destination [fname, lname, addr1]
So, is LINQ a potential candidate for this job? Or regular expressions? I started with this
Having a source DataTable dt
var Lcols = from c in dt.Columns.Cast<System.Data.DataColumn>()
select c.ColumnName;
I am not sure where to go from here...
Thank you!