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

how to return zero when output is null

$
0
0

 Hi

i have a table reservationbydate in that i have hotelid,type of room,date and noofroom.I should get the total no of rooms for aparticular date.
.how to return zero when output is null

 var avaliabiltyQuery = from a in db.tbl_ReservationByDates
                               where a.HotelID == HotelId
                               && a.RoomType == Drp_TypeOfRoom.Text
                               && a.BookedDate == StartDate
                               group a by a.HotelID into g
                               select new {TotalRooms=g.Sum(a=>a.NoofBookedRooms)

                              
                               };
.


Viewing all articles
Browse latest Browse all 5678

Trending Articles



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