Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

How to sum a colum using LINQ

$
0
0

Hi

i have a table reservationbydate i n that i have hotelid,type of room,date and noofroom.I should get the total no of rooms for aparticular date.How to do that.

 DateTime StartDate = Convert.ToDateTime(Txt_Checkindate.Text);
        DateTime EndDate = Convert.ToDateTime(Txt_Checkoutdate.Text);


        var avaliabiltyQuery = from a in db.tbl_ReservationByDates
                               where a.HotelID == HotelId
                               && a.RoomType == Drp_TypeOfRoom.Text
                               && a.BookedDate == StartDate

                               select new {how to get the sum of noofroom column
                               
                               };

 


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>