How to check available hotel rooms












0















I am making a hotel reservation system in windows form by using SQL with LINQ. I have tables such as reservation tabel and room table. In reservation table I have checkin and checkout dates. I have no problem to show those rooms from reservation table in a specific date, but I don't know how to show rooms that are available on specific dates. I don't how to compare or filter out RoomsId from reservation table and room table.



Here is how I am getting rooms from reservation table on a specific date (checkin and checkout):



DateTime StartDateWantToBook = Convert.ToDateTime(dateTimePicker1.Value.ToString());
DateTime EndDateWantToBook = Convert.ToDateTime(dateTimePicker2.Value.ToString());

var ReservedRooms = (from u in db.Room join b in db.Reservation on u.RoomId equals b.RoomId join f in db.Floor on u.FloorId equals f.FloorId join ty in db.RoomType on u.RoomTypeId equals ty.RoomTypeId where StartDateWantToBook <= b.EndDate && b.StartDate <= EndDateWantToBook
select new {
RomId = b.RoomId,
Floor = f.FloorName,
RommsNr = u.RumNummer,
Room_Type = ty.AmountRomms
// But Here by somehow I think I have to run
// another Linq query to filter RoomsId and show only those who do not exists in Reservation table.
}
).ToList();
dataGridView1.DataSource = ReservedRooms;


So the question is How to show all rooms in Rooms table that do not exist in Reservartionroom in a specific dates. Thank you again!










share|improve this question

























  • You may just need to check that the last process on each room was a checkout or null, I am not sure about the syntax but it should be similar to this : b.Last().ProcessType == "Checkout". this should be added to your where statement. Also I see that you only include rooms that has a reservation before.

    – Abdullah Dibas
    Nov 25 '18 at 8:26


















0















I am making a hotel reservation system in windows form by using SQL with LINQ. I have tables such as reservation tabel and room table. In reservation table I have checkin and checkout dates. I have no problem to show those rooms from reservation table in a specific date, but I don't know how to show rooms that are available on specific dates. I don't how to compare or filter out RoomsId from reservation table and room table.



Here is how I am getting rooms from reservation table on a specific date (checkin and checkout):



DateTime StartDateWantToBook = Convert.ToDateTime(dateTimePicker1.Value.ToString());
DateTime EndDateWantToBook = Convert.ToDateTime(dateTimePicker2.Value.ToString());

var ReservedRooms = (from u in db.Room join b in db.Reservation on u.RoomId equals b.RoomId join f in db.Floor on u.FloorId equals f.FloorId join ty in db.RoomType on u.RoomTypeId equals ty.RoomTypeId where StartDateWantToBook <= b.EndDate && b.StartDate <= EndDateWantToBook
select new {
RomId = b.RoomId,
Floor = f.FloorName,
RommsNr = u.RumNummer,
Room_Type = ty.AmountRomms
// But Here by somehow I think I have to run
// another Linq query to filter RoomsId and show only those who do not exists in Reservation table.
}
).ToList();
dataGridView1.DataSource = ReservedRooms;


So the question is How to show all rooms in Rooms table that do not exist in Reservartionroom in a specific dates. Thank you again!










share|improve this question

























  • You may just need to check that the last process on each room was a checkout or null, I am not sure about the syntax but it should be similar to this : b.Last().ProcessType == "Checkout". this should be added to your where statement. Also I see that you only include rooms that has a reservation before.

    – Abdullah Dibas
    Nov 25 '18 at 8:26
















0












0








0








I am making a hotel reservation system in windows form by using SQL with LINQ. I have tables such as reservation tabel and room table. In reservation table I have checkin and checkout dates. I have no problem to show those rooms from reservation table in a specific date, but I don't know how to show rooms that are available on specific dates. I don't how to compare or filter out RoomsId from reservation table and room table.



Here is how I am getting rooms from reservation table on a specific date (checkin and checkout):



DateTime StartDateWantToBook = Convert.ToDateTime(dateTimePicker1.Value.ToString());
DateTime EndDateWantToBook = Convert.ToDateTime(dateTimePicker2.Value.ToString());

var ReservedRooms = (from u in db.Room join b in db.Reservation on u.RoomId equals b.RoomId join f in db.Floor on u.FloorId equals f.FloorId join ty in db.RoomType on u.RoomTypeId equals ty.RoomTypeId where StartDateWantToBook <= b.EndDate && b.StartDate <= EndDateWantToBook
select new {
RomId = b.RoomId,
Floor = f.FloorName,
RommsNr = u.RumNummer,
Room_Type = ty.AmountRomms
// But Here by somehow I think I have to run
// another Linq query to filter RoomsId and show only those who do not exists in Reservation table.
}
).ToList();
dataGridView1.DataSource = ReservedRooms;


So the question is How to show all rooms in Rooms table that do not exist in Reservartionroom in a specific dates. Thank you again!










share|improve this question
















I am making a hotel reservation system in windows form by using SQL with LINQ. I have tables such as reservation tabel and room table. In reservation table I have checkin and checkout dates. I have no problem to show those rooms from reservation table in a specific date, but I don't know how to show rooms that are available on specific dates. I don't how to compare or filter out RoomsId from reservation table and room table.



Here is how I am getting rooms from reservation table on a specific date (checkin and checkout):



DateTime StartDateWantToBook = Convert.ToDateTime(dateTimePicker1.Value.ToString());
DateTime EndDateWantToBook = Convert.ToDateTime(dateTimePicker2.Value.ToString());

var ReservedRooms = (from u in db.Room join b in db.Reservation on u.RoomId equals b.RoomId join f in db.Floor on u.FloorId equals f.FloorId join ty in db.RoomType on u.RoomTypeId equals ty.RoomTypeId where StartDateWantToBook <= b.EndDate && b.StartDate <= EndDateWantToBook
select new {
RomId = b.RoomId,
Floor = f.FloorName,
RommsNr = u.RumNummer,
Room_Type = ty.AmountRomms
// But Here by somehow I think I have to run
// another Linq query to filter RoomsId and show only those who do not exists in Reservation table.
}
).ToList();
dataGridView1.DataSource = ReservedRooms;


So the question is How to show all rooms in Rooms table that do not exist in Reservartionroom in a specific dates. Thank you again!







c# sql linq






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 25 '18 at 21:37









marc_s

581k13011201268




581k13011201268










asked Nov 25 '18 at 8:04









Helen TekieHelen Tekie

1401110




1401110













  • You may just need to check that the last process on each room was a checkout or null, I am not sure about the syntax but it should be similar to this : b.Last().ProcessType == "Checkout". this should be added to your where statement. Also I see that you only include rooms that has a reservation before.

    – Abdullah Dibas
    Nov 25 '18 at 8:26





















  • You may just need to check that the last process on each room was a checkout or null, I am not sure about the syntax but it should be similar to this : b.Last().ProcessType == "Checkout". this should be added to your where statement. Also I see that you only include rooms that has a reservation before.

    – Abdullah Dibas
    Nov 25 '18 at 8:26



















You may just need to check that the last process on each room was a checkout or null, I am not sure about the syntax but it should be similar to this : b.Last().ProcessType == "Checkout". this should be added to your where statement. Also I see that you only include rooms that has a reservation before.

– Abdullah Dibas
Nov 25 '18 at 8:26







You may just need to check that the last process on each room was a checkout or null, I am not sure about the syntax but it should be similar to this : b.Last().ProcessType == "Checkout". this should be added to your where statement. Also I see that you only include rooms that has a reservation before.

– Abdullah Dibas
Nov 25 '18 at 8:26














3 Answers
3






active

oldest

votes


















0














This must work for you.



var AvailebleRooms = (from u in db.Room
where (!u.Reservation.Any(b => b.EndDate >= StartDateWantToBook && b.StartDate <= EndDateWantToBook))
select u).ToList();





share|improve this answer
























  • Fantastic .... this work perfekt. Thank you very much and Thank you everybody

    – Helen Tekie
    Nov 25 '18 at 18:00



















0














i think you need left outer join AllRooms and ReservedRooms to get rooms only using where clause with specific dates






share|improve this answer































    0














    You need to select AllRooms, ReservedRooms in a specific date and filter AllRoom by list reservartion. That's my Idea, maybe contains is wrong.



    DateTime StartDateWantToBook = Convert.ToDateTime(dateTimePicker1.Value.ToString());
    DateTime EndDateWantToBook = Convert.ToDateTime(dateTimePicker2.Value.ToString());

    var AllRooms = (from u in db.Room join b in db.Reservation on u.RoomId equals b.RoomId join f in db.Floor on u.FloorId equals f.FloorId join ty in db.RoomType on u.RoomTypeId equals ty.RoomTypeId select new {
    RomId = b.RoomId,
    Floor = f.FloorName,
    RommsNr = u.RumNummer,
    Room_Type = ty.AmountRomms
    // But Here by somehow I think I have to run
    // another Linq query to filter RoomsId and show only those who do not exists in Reservation table.
    }).ToList();

    var ReservedRooms = (from u in db.Room join b in db.Reservation on u.RoomId equals b.RoomId join f in db.Floor on u.FloorId equals f.FloorId join ty in db.RoomType on u.RoomTypeId equals ty.RoomTypeId where StartDateWantToBook <= b.EndDate && b.StartDate <= EndDateWantToBook select new {
    RomId = b.RoomId,
    Floor = f.FloorName,
    RommsNr = u.RumNummer,
    Room_Type = ty.AmountRomms
    // But Here by somehow I think I have to run
    // another Linq query to filter RoomsId and show only those who do not exists in Reservation table.

    }).ToList();

    var result = AllRoom.Except(ReservedRooms);
    dataGridView1.DataSource = ReservedRooms;





    share|improve this answer


























    • thank you for your response, but I Think AllRooms ling goes to ReserverdRomms and ReservedRoom linq to on the contrary AllRooms, right? In both Linq you have Reserved rooms

      – Helen Tekie
      Nov 25 '18 at 9:12













    • as you mentioned it is not working with Contain becouse RoomsId is an integer

      – Helen Tekie
      Nov 25 '18 at 9:29











    • I think AllRooms include ReserverdRomms and do not exist in Reservartionroom in a specific dates.So that I get all and select room which do not exist in ReserverdRomms

      – Zone
      Nov 25 '18 at 9:30













    • but both are exact equals linq codes. It's only names different AllRooms and ReservedRooms. The linq code is the same, is that should to be?

      – Helen Tekie
      Nov 25 '18 at 9:50











    • AllRoom don't have where for specific dates ( it's take all Room )

      – Zone
      Nov 25 '18 at 9:55











    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53465696%2fhow-to-check-available-hotel-rooms%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    This must work for you.



    var AvailebleRooms = (from u in db.Room
    where (!u.Reservation.Any(b => b.EndDate >= StartDateWantToBook && b.StartDate <= EndDateWantToBook))
    select u).ToList();





    share|improve this answer
























    • Fantastic .... this work perfekt. Thank you very much and Thank you everybody

      – Helen Tekie
      Nov 25 '18 at 18:00
















    0














    This must work for you.



    var AvailebleRooms = (from u in db.Room
    where (!u.Reservation.Any(b => b.EndDate >= StartDateWantToBook && b.StartDate <= EndDateWantToBook))
    select u).ToList();





    share|improve this answer
























    • Fantastic .... this work perfekt. Thank you very much and Thank you everybody

      – Helen Tekie
      Nov 25 '18 at 18:00














    0












    0








    0







    This must work for you.



    var AvailebleRooms = (from u in db.Room
    where (!u.Reservation.Any(b => b.EndDate >= StartDateWantToBook && b.StartDate <= EndDateWantToBook))
    select u).ToList();





    share|improve this answer













    This must work for you.



    var AvailebleRooms = (from u in db.Room
    where (!u.Reservation.Any(b => b.EndDate >= StartDateWantToBook && b.StartDate <= EndDateWantToBook))
    select u).ToList();






    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Nov 25 '18 at 17:47









    Jonas WillanderJonas Willander

    1741314




    1741314













    • Fantastic .... this work perfekt. Thank you very much and Thank you everybody

      – Helen Tekie
      Nov 25 '18 at 18:00



















    • Fantastic .... this work perfekt. Thank you very much and Thank you everybody

      – Helen Tekie
      Nov 25 '18 at 18:00

















    Fantastic .... this work perfekt. Thank you very much and Thank you everybody

    – Helen Tekie
    Nov 25 '18 at 18:00





    Fantastic .... this work perfekt. Thank you very much and Thank you everybody

    – Helen Tekie
    Nov 25 '18 at 18:00













    0














    i think you need left outer join AllRooms and ReservedRooms to get rooms only using where clause with specific dates






    share|improve this answer




























      0














      i think you need left outer join AllRooms and ReservedRooms to get rooms only using where clause with specific dates






      share|improve this answer


























        0












        0








        0







        i think you need left outer join AllRooms and ReservedRooms to get rooms only using where clause with specific dates






        share|improve this answer













        i think you need left outer join AllRooms and ReservedRooms to get rooms only using where clause with specific dates







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 25 '18 at 11:03









        Mamdouh EltawelMamdouh Eltawel

        1




        1























            0














            You need to select AllRooms, ReservedRooms in a specific date and filter AllRoom by list reservartion. That's my Idea, maybe contains is wrong.



            DateTime StartDateWantToBook = Convert.ToDateTime(dateTimePicker1.Value.ToString());
            DateTime EndDateWantToBook = Convert.ToDateTime(dateTimePicker2.Value.ToString());

            var AllRooms = (from u in db.Room join b in db.Reservation on u.RoomId equals b.RoomId join f in db.Floor on u.FloorId equals f.FloorId join ty in db.RoomType on u.RoomTypeId equals ty.RoomTypeId select new {
            RomId = b.RoomId,
            Floor = f.FloorName,
            RommsNr = u.RumNummer,
            Room_Type = ty.AmountRomms
            // But Here by somehow I think I have to run
            // another Linq query to filter RoomsId and show only those who do not exists in Reservation table.
            }).ToList();

            var ReservedRooms = (from u in db.Room join b in db.Reservation on u.RoomId equals b.RoomId join f in db.Floor on u.FloorId equals f.FloorId join ty in db.RoomType on u.RoomTypeId equals ty.RoomTypeId where StartDateWantToBook <= b.EndDate && b.StartDate <= EndDateWantToBook select new {
            RomId = b.RoomId,
            Floor = f.FloorName,
            RommsNr = u.RumNummer,
            Room_Type = ty.AmountRomms
            // But Here by somehow I think I have to run
            // another Linq query to filter RoomsId and show only those who do not exists in Reservation table.

            }).ToList();

            var result = AllRoom.Except(ReservedRooms);
            dataGridView1.DataSource = ReservedRooms;





            share|improve this answer


























            • thank you for your response, but I Think AllRooms ling goes to ReserverdRomms and ReservedRoom linq to on the contrary AllRooms, right? In both Linq you have Reserved rooms

              – Helen Tekie
              Nov 25 '18 at 9:12













            • as you mentioned it is not working with Contain becouse RoomsId is an integer

              – Helen Tekie
              Nov 25 '18 at 9:29











            • I think AllRooms include ReserverdRomms and do not exist in Reservartionroom in a specific dates.So that I get all and select room which do not exist in ReserverdRomms

              – Zone
              Nov 25 '18 at 9:30













            • but both are exact equals linq codes. It's only names different AllRooms and ReservedRooms. The linq code is the same, is that should to be?

              – Helen Tekie
              Nov 25 '18 at 9:50











            • AllRoom don't have where for specific dates ( it's take all Room )

              – Zone
              Nov 25 '18 at 9:55
















            0














            You need to select AllRooms, ReservedRooms in a specific date and filter AllRoom by list reservartion. That's my Idea, maybe contains is wrong.



            DateTime StartDateWantToBook = Convert.ToDateTime(dateTimePicker1.Value.ToString());
            DateTime EndDateWantToBook = Convert.ToDateTime(dateTimePicker2.Value.ToString());

            var AllRooms = (from u in db.Room join b in db.Reservation on u.RoomId equals b.RoomId join f in db.Floor on u.FloorId equals f.FloorId join ty in db.RoomType on u.RoomTypeId equals ty.RoomTypeId select new {
            RomId = b.RoomId,
            Floor = f.FloorName,
            RommsNr = u.RumNummer,
            Room_Type = ty.AmountRomms
            // But Here by somehow I think I have to run
            // another Linq query to filter RoomsId and show only those who do not exists in Reservation table.
            }).ToList();

            var ReservedRooms = (from u in db.Room join b in db.Reservation on u.RoomId equals b.RoomId join f in db.Floor on u.FloorId equals f.FloorId join ty in db.RoomType on u.RoomTypeId equals ty.RoomTypeId where StartDateWantToBook <= b.EndDate && b.StartDate <= EndDateWantToBook select new {
            RomId = b.RoomId,
            Floor = f.FloorName,
            RommsNr = u.RumNummer,
            Room_Type = ty.AmountRomms
            // But Here by somehow I think I have to run
            // another Linq query to filter RoomsId and show only those who do not exists in Reservation table.

            }).ToList();

            var result = AllRoom.Except(ReservedRooms);
            dataGridView1.DataSource = ReservedRooms;





            share|improve this answer


























            • thank you for your response, but I Think AllRooms ling goes to ReserverdRomms and ReservedRoom linq to on the contrary AllRooms, right? In both Linq you have Reserved rooms

              – Helen Tekie
              Nov 25 '18 at 9:12













            • as you mentioned it is not working with Contain becouse RoomsId is an integer

              – Helen Tekie
              Nov 25 '18 at 9:29











            • I think AllRooms include ReserverdRomms and do not exist in Reservartionroom in a specific dates.So that I get all and select room which do not exist in ReserverdRomms

              – Zone
              Nov 25 '18 at 9:30













            • but both are exact equals linq codes. It's only names different AllRooms and ReservedRooms. The linq code is the same, is that should to be?

              – Helen Tekie
              Nov 25 '18 at 9:50











            • AllRoom don't have where for specific dates ( it's take all Room )

              – Zone
              Nov 25 '18 at 9:55














            0












            0








            0







            You need to select AllRooms, ReservedRooms in a specific date and filter AllRoom by list reservartion. That's my Idea, maybe contains is wrong.



            DateTime StartDateWantToBook = Convert.ToDateTime(dateTimePicker1.Value.ToString());
            DateTime EndDateWantToBook = Convert.ToDateTime(dateTimePicker2.Value.ToString());

            var AllRooms = (from u in db.Room join b in db.Reservation on u.RoomId equals b.RoomId join f in db.Floor on u.FloorId equals f.FloorId join ty in db.RoomType on u.RoomTypeId equals ty.RoomTypeId select new {
            RomId = b.RoomId,
            Floor = f.FloorName,
            RommsNr = u.RumNummer,
            Room_Type = ty.AmountRomms
            // But Here by somehow I think I have to run
            // another Linq query to filter RoomsId and show only those who do not exists in Reservation table.
            }).ToList();

            var ReservedRooms = (from u in db.Room join b in db.Reservation on u.RoomId equals b.RoomId join f in db.Floor on u.FloorId equals f.FloorId join ty in db.RoomType on u.RoomTypeId equals ty.RoomTypeId where StartDateWantToBook <= b.EndDate && b.StartDate <= EndDateWantToBook select new {
            RomId = b.RoomId,
            Floor = f.FloorName,
            RommsNr = u.RumNummer,
            Room_Type = ty.AmountRomms
            // But Here by somehow I think I have to run
            // another Linq query to filter RoomsId and show only those who do not exists in Reservation table.

            }).ToList();

            var result = AllRoom.Except(ReservedRooms);
            dataGridView1.DataSource = ReservedRooms;





            share|improve this answer















            You need to select AllRooms, ReservedRooms in a specific date and filter AllRoom by list reservartion. That's my Idea, maybe contains is wrong.



            DateTime StartDateWantToBook = Convert.ToDateTime(dateTimePicker1.Value.ToString());
            DateTime EndDateWantToBook = Convert.ToDateTime(dateTimePicker2.Value.ToString());

            var AllRooms = (from u in db.Room join b in db.Reservation on u.RoomId equals b.RoomId join f in db.Floor on u.FloorId equals f.FloorId join ty in db.RoomType on u.RoomTypeId equals ty.RoomTypeId select new {
            RomId = b.RoomId,
            Floor = f.FloorName,
            RommsNr = u.RumNummer,
            Room_Type = ty.AmountRomms
            // But Here by somehow I think I have to run
            // another Linq query to filter RoomsId and show only those who do not exists in Reservation table.
            }).ToList();

            var ReservedRooms = (from u in db.Room join b in db.Reservation on u.RoomId equals b.RoomId join f in db.Floor on u.FloorId equals f.FloorId join ty in db.RoomType on u.RoomTypeId equals ty.RoomTypeId where StartDateWantToBook <= b.EndDate && b.StartDate <= EndDateWantToBook select new {
            RomId = b.RoomId,
            Floor = f.FloorName,
            RommsNr = u.RumNummer,
            Room_Type = ty.AmountRomms
            // But Here by somehow I think I have to run
            // another Linq query to filter RoomsId and show only those who do not exists in Reservation table.

            }).ToList();

            var result = AllRoom.Except(ReservedRooms);
            dataGridView1.DataSource = ReservedRooms;






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Nov 25 '18 at 21:38









            marc_s

            581k13011201268




            581k13011201268










            answered Nov 25 '18 at 8:58









            ZoneZone

            14




            14













            • thank you for your response, but I Think AllRooms ling goes to ReserverdRomms and ReservedRoom linq to on the contrary AllRooms, right? In both Linq you have Reserved rooms

              – Helen Tekie
              Nov 25 '18 at 9:12













            • as you mentioned it is not working with Contain becouse RoomsId is an integer

              – Helen Tekie
              Nov 25 '18 at 9:29











            • I think AllRooms include ReserverdRomms and do not exist in Reservartionroom in a specific dates.So that I get all and select room which do not exist in ReserverdRomms

              – Zone
              Nov 25 '18 at 9:30













            • but both are exact equals linq codes. It's only names different AllRooms and ReservedRooms. The linq code is the same, is that should to be?

              – Helen Tekie
              Nov 25 '18 at 9:50











            • AllRoom don't have where for specific dates ( it's take all Room )

              – Zone
              Nov 25 '18 at 9:55



















            • thank you for your response, but I Think AllRooms ling goes to ReserverdRomms and ReservedRoom linq to on the contrary AllRooms, right? In both Linq you have Reserved rooms

              – Helen Tekie
              Nov 25 '18 at 9:12













            • as you mentioned it is not working with Contain becouse RoomsId is an integer

              – Helen Tekie
              Nov 25 '18 at 9:29











            • I think AllRooms include ReserverdRomms and do not exist in Reservartionroom in a specific dates.So that I get all and select room which do not exist in ReserverdRomms

              – Zone
              Nov 25 '18 at 9:30













            • but both are exact equals linq codes. It's only names different AllRooms and ReservedRooms. The linq code is the same, is that should to be?

              – Helen Tekie
              Nov 25 '18 at 9:50











            • AllRoom don't have where for specific dates ( it's take all Room )

              – Zone
              Nov 25 '18 at 9:55

















            thank you for your response, but I Think AllRooms ling goes to ReserverdRomms and ReservedRoom linq to on the contrary AllRooms, right? In both Linq you have Reserved rooms

            – Helen Tekie
            Nov 25 '18 at 9:12







            thank you for your response, but I Think AllRooms ling goes to ReserverdRomms and ReservedRoom linq to on the contrary AllRooms, right? In both Linq you have Reserved rooms

            – Helen Tekie
            Nov 25 '18 at 9:12















            as you mentioned it is not working with Contain becouse RoomsId is an integer

            – Helen Tekie
            Nov 25 '18 at 9:29





            as you mentioned it is not working with Contain becouse RoomsId is an integer

            – Helen Tekie
            Nov 25 '18 at 9:29













            I think AllRooms include ReserverdRomms and do not exist in Reservartionroom in a specific dates.So that I get all and select room which do not exist in ReserverdRomms

            – Zone
            Nov 25 '18 at 9:30







            I think AllRooms include ReserverdRomms and do not exist in Reservartionroom in a specific dates.So that I get all and select room which do not exist in ReserverdRomms

            – Zone
            Nov 25 '18 at 9:30















            but both are exact equals linq codes. It's only names different AllRooms and ReservedRooms. The linq code is the same, is that should to be?

            – Helen Tekie
            Nov 25 '18 at 9:50





            but both are exact equals linq codes. It's only names different AllRooms and ReservedRooms. The linq code is the same, is that should to be?

            – Helen Tekie
            Nov 25 '18 at 9:50













            AllRoom don't have where for specific dates ( it's take all Room )

            – Zone
            Nov 25 '18 at 9:55





            AllRoom don't have where for specific dates ( it's take all Room )

            – Zone
            Nov 25 '18 at 9:55


















            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53465696%2fhow-to-check-available-hotel-rooms%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            To store a contact into the json file from server.js file using a class in NodeJS

            Marschland

            Redirect URL with Chrome Remote Debugging Android Devices