title: SQL stored procedure to Lambda
body: <p>I have been developing a small project and have trouble getting around a sql stored procedure into a lambda. My project is C# MVC Code first. I have looked into some posts around here but with no success.</p>
  
  <p>The first version is where Total is minutes rounded up (for each minute) and second is just all seconds converted into minutes:
  Rounded up every minute:</p>
  
  <pre><code>    select ISNULL(noT,'?') as NType,count(*) as TotalCount,SUM((Duration + 59) / 60) as TotalMinutes
      from cHis
      where hDate between @fromDate AND @toDate And Customer_CustomerID = @CustomerID and I_ID = @I_ID
      group by ISNULL(noT,'?') 
  </code></pre>
  
  <p>Rounded up total into minutes:</p>
  
  <pre><code>    select ISNULL(noT,'?') as NType,count(*) as TotalCount,SUM((Duration) / 60) as TotalMinutes
      from cHis
      where hDate between @fromDate AND @toDate And Customer_CustomerID = @CustomerID and I_ID = @I_ID
      group by ISNULL(noT,'?')
  </code></pre>
  
  <p>I am open to suggestions and hopefully some ideas for solutions.</p>
  
  <p>Thank you for the help in advance.</p>