sumit gugnani

sumit gugnani

  • NA
  • 48
  • 7.5k

Query

Apr 5 2016 5:02 AM
Hi
I have a query in sql. i want to change linq query, how to change please help
 
query:-
SELECT Location.Name, BookingInviteeDetail.LocationId, Booking.Id, Booking.VisitTypeId, Booking.LocationTxt,Booking.ProductId,
Booking.SupplierId, Booking.SupplierName, Booking.AmexHotelId, Booking.FHRScore,Booking.Date , Booking.Slot, Booking.Status,
Booking.IsCancelled, Booking.ConfirmationCode, Booking.IsBookedByAdmin, Booking.IsTemp, Booking.CreatedDate, Booking.TimeFrom,
Booking.TimeTo, Booking.SpecialRequest, Booking.Brand, Booking.InitialDate, Booking.IsMultiple, Booking.EndBookingDate,
Booking.CouncelorNumber, Booking.TravelCouncelor, ProductType.Name AS ProductName, BookingContact.Name AS ContactName,
BookingContact.Email, BookingContact.CompanyName, Booking.BrandId,isnull((Select Count(1) from BookingContact where
BookingId=Booking.Id and BookingContactTypeId=2 group by BookingId),0) as cnt FROM Booking INNER JOIN
BookingInviteeDetail ON Booking.Id = BookingInviteeDetail.BookingId INNER JOIN Location ON
BookingInviteeDetail.LocationId = Location.Id INNER JOIN BookingContact ON
Booking.Id = BookingContact.BookingId AND BookingContact.BookingContactTypeId=1 INNER JOIN
ProductType ON Booking.ProductId = ProductType.Id where Location.IsActive = 1 and Booking.VisitTypeId = 1 and
Booking.Status = 2 and Booking.IsTemp = 0 and Booking.IsCancelled=0 and
Booking.Date >='04/05/16' and Booking.Date<='05/03/16' order by Booking.Date
 
Please help 

Answers (3)