Pass Entity data through wcf servce RRS feed

  • Question

  • Hello!

    I'm new to the Entity Framework, LINQ AND MVC, but I thought I'd give it a try. I'm using VS2010 Beta 2.

    I'm buildning a booking system for a SPA. I'd like to use a WCF-service since I'd like to access the data from both ASP.net and Windows Clients.

    I've managed to create a model of the part of the DB that I will be using and passed my first LINQ-query. It was easier than I expected. Great! It returns all the bookings between two dates for a specific treatment room.

     Using ctx As New LSEntities
       Dim results = From booking In ctx.Booking
                     Where booking.BookingStartTime >= FromDate And booking.BookingEndTime <= ToDate And booking.TreatmentRoom.TreatmentRoomLocationID = Location
     End Using
    The bookings turn up all right, but how do I pass the results?

    Also, the model is displayd in the service, but I don't know how to use that when I create views.

    So... Am I on the right track here? I'd really would like a How to: Build and consume WCF services using the Entity Framwork. Can anyone point me in the right direction.

    Thanks in advance!

    Best Regards

    Sunday, December 6, 2009 9:08 PM


All replies