title: Converting "float" in DataSet from SQL to "float" in Web API
body: <p>I have an issues converting dataset ds from SQL server to an object in Web API. The issues is only with the "float" present in the dataset  (ds). I am trying to convert the dataset (ds) into a list of objects. But it throws an error for all the "float". If I exclude all the float, it works fine.</p>
  
  <pre><code>private static List&lt;TimesheetDetails&gt; ProcessInfo(DataSet ds)
  
  
          {
              bool check = (ds == null);
              List&lt;TimesheetDetails&gt; list = ds.Tables[0].AsEnumerable().Select(x =&gt; new TimesheetDetails
              {
                  DetailId = x.Field&lt;int&gt;("DetailId"),
                  TimesheetId = x.Field&lt;int&gt;("TimesheetId"),
                  Project = x.Field&lt;string&gt;("Project"),
                  Ac`enter code here`tivity = x.Field&lt;string&gt;("Activity"),
                  Day1 = x.Field&lt;DateTime&gt; ("Day1"),
                  **//The Issue comes up here when I try to access the float.**
                  Day1Hours = x.Field&lt;float&gt; ("Day1Hours"),
                  Day2 = x.Field&lt;DateTime&gt;("Day2"),
                  Day2Hours = x.Field&lt;float&gt;("Day2Hours"),
                  Day3 = x.Field&lt;DateTime&gt;("Day3"),
                  Day3Hours = x.Field&lt;float&gt;("Day3Hours"),
                  Day4 = x.Field&lt;DateTime&gt;("Day4"),
                  Day4Hours = x.Field&lt;float&gt;("Day4Hours"),
                  Day5 = x.Field&lt;DateTime&gt;("Day5"),
                  Day5Hours = x.Field&lt;float&gt;("Day5Hours"),
                  Day6 = x.Field&lt;DateTime&gt;("Day6"),
                  Day6Hours = x.Field&lt;float&gt;("Day6Hours"),
                  Day7 = x.Field&lt;DateTime&gt;("Day7"),
                  Day7Hours = x.Field&lt;float&gt;("Day7Hours")
              }).ToList();
  </code></pre>