public static void fetchdata() { string USER_ID="AH01" northwinddatacontext nc= new northwinddatacontext();//datacontext where I have added my table called username Dictionary<string,> types = new Dictionary<string,>(); DataTable dt = new DataTable(); var result = from x in nc.usernames where (x.userId == USER_ID) select x dt=Common.LINQToDataTable(result); foreach (DataRow row in dt.Rows) { nwind nw = new nwind (); nw.userID = row.Field<string>("userID").ToString(); types .Add(nw.userID, nw); } }</string>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)