Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LINQ Join does not work #130

Open
lnetrebskii opened this issue May 4, 2021 · 0 comments
Open

LINQ Join does not work #130

lnetrebskii opened this issue May 4, 2021 · 0 comments
Labels
Server Platform API Fix\Change Cannot be fixed client side, requires server side fix

Comments

@lnetrebskii
Copy link

lnetrebskii commented May 4, 2021

Join operation does not work. The next query returns an empty object for BookingStatus.

_context.CreateQuery<BookableResourceBooking>()
                .Join(_context.CreateQuery<BookingStatus>(),
                    brb => brb.BookingStatus.Id,
                    st => st.Id,
                    (brb, st) => new { Brb = brb, Status = st }
                    )
                .Where(x => x.Status.Status != BookingStatus_Status.Canceled &&
                            x.Brb.msdyn_WorkOrder.Id == workOrderId)
                .Select(x =>
                    new Tuple<BookableResourceBooking, BookingStatus>(
                        new BookableResourceBooking
                        {
                            Id = x.Brb.Id,
                            BookingStatus = x.Brb.BookingStatus,
                            StartTime = x.Brb.StartTime,
                            Resource = x.Brb.Resource,
                            msdyn_WorkOrder = x.Brb.msdyn_WorkOrder
                        },
                        new BookingStatus
                        {
                            Id = x.Status.Id,
                            Status = x.Status.Status
                        })
                )
@MattB-msft MattB-msft added the Server Platform API Fix\Change Cannot be fixed client side, requires server side fix label Oct 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Server Platform API Fix\Change Cannot be fixed client side, requires server side fix
Projects
None yet
Development

No branches or pull requests

2 participants