TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
sumit gugnani
NA
48
7.6k
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
Reply
Answers (
3
)
How to join in linq to avoid multiple datbase call ?
LINQ and WCF Services