title: List<DataRow> to custom List<Model>
body: <p>I have used the following code:  </p>
  
  <pre><code>ManageUser userObj = new ManageUser();
  List&lt;StoreUserList&gt; storeList = new List&lt;StoreUserList&gt;();
  StoreUserList sl = new StoreUserList();
  foreach (var items in userObj.GetStoreUserList(Username, Password))
  {
      sl.UserName = items[0].ToString();
      sl.EmailId = items[1].ToString();
      sl.FirstName = items[2].ToString();
      sl.LastName = items[3].ToString();
      sl.BadLoginCount = Convert.ToInt32(items[4]);
      sl.ManagerName = items[5].ToString();
      storeList.Add(sl);
  }
  </code></pre>
  
  <p><strong>StoreUserList</strong> is my Model in which i have defined all the properties.<br>
  <strong>ManagerUser</strong> is the class which will return the data in the form of List&lt;<strong>DataRow</strong>>.  </p>
  
  <p>So, i order to populate the a generic list of my model type i have used the above code, to do it.<br>
  But, as you can see i have hard-coded all the values to bind the model and then added that model to the list. I just wanted to know that is there some other way to do it or some magic way to do it in easy?</p>