Sending a list of doubles as strings to the database
<p>Just quite confused with the piece of code below.</p>

<p>I have class like below</p>

<pre><code>public class Counter
{       
    public Double NormalCounter { get; set; }
    public Double SATCounter { get; set; }
    public Double SUNCounter { get; set; }

}
</code></pre>

<p>in my main class i have method to do some calculation to fill the counter</p>

<pre><code>Counter CountHrs = GetBookedHours(resourceBkg, PrevEvent);
var lstExpResult = new List&lt;string&gt; {CountHrs.NormalCounter.ToString(),
                                     CountHrs.SATCounter.ToString(), 
                                     CountHrs.SUNCounter.ToString()};
UpdateBooking(bookingSesid, lstExpResult);
</code></pre>

<p>Just assume i have the value like below in the counter</p>

<blockquote>
  <p>NormalCounter =4 </p>
  
  <p>SATCounter=10</p>
  
  <p>SUNCounter=6</p>
</blockquote>

<p>am trying to add in to string list and update the database.is that the right way to do ? or any other options i have please.</p>

<p>my update booking method is below to give clear idea.</p>

<pre><code> public static bool UpdateBooking(string BookingSesid,List&lt;string&gt;HoursByRate)
    {
         SchedwinEntities db = new SchedwinEntities();
         string value = string.Empty;
         for (int i = 0; i &lt; 5; i++)
         {
             string str = " ";
             if (i &lt; HoursByRate.Count())
             {
                 str = HoursByRate[i];
                 value += str + ((char)13).ToString() + ((char)10).ToString();
             }
         }
            var query = 
            from SEVTs in db.SEVTs
            where
            SEVTs.SESID.Trim() == BookingSesid//SESID
            select SEVTs;
        foreach (var SEVTs in query)
        {
            SEVTs.USER3 = value;//value
        }
        try
        {
            db.SaveChanges();
            return true;
        }
        catch (UpdateException ex)
        {
            return false;
        }
    }
</code></pre>
