Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6361415
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:46:28+00:00 2026-05-24T23:46:28+00:00

To date, everything I needed to do with RIA services was very simple and

  • 0

To date, everything I needed to do with RIA services was very simple and could be done using the code generated based on the domain model. However, I now need to have a custom method on the server side that either performs some logic or calls a stored proc in the database. I am able to write a custom server side method to get the filtered data from a table I need as follows:

public IQueryable<TIMESLOT> GetPermissableTimeslots(
    int roomID,
    int semesterID,
    Int16 year)
{
    return this.ObjectContext.TIMESLOTs.Where<TIMESLOT>(
        ts => 
            ts.ROOM_ID == roomID && 
            ts.SEMESTER == semesterID && 
            ts.YEAR == year
    );
}

(Note: I will eventually replace the LINQ query with a call to a stored proc once I get my current problems figured out)

Visual Studio generates GetPermissableTimeslotsQuery on the client which I am able to use to load the data as follows:

private void LoadPermissibleTimeSlots()
{
        this.domainContext.Load(
            domainContext.GetPermissableTimeslotsQuery(
                this.CurrentRoom.ID, 
                this.CurrentSemester.ID, 
                this.CurrentYear),
            (result) =>
            {
                this.Timeslots = result.Entities;
            }
            , null);
}

The problem I have now is adding and updating timeslots that the user changes in the client. Since the result I get is not an EntitySet and not associated directly with the TIMESLOTS table, I can’t just update them in the resulting entity set and commit the changes. Do I need to attach the changed entities to an EntitySet associated with the TIMESLOTS table so that they can be committed, or do I need to add custom add and update methods on the server side to support this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T23:46:29+00:00Added an answer on May 24, 2026 at 11:46 pm

    The entities that are returned by the query should be attached automatically to the domain context. You should be able to modify them and have those changes propagated back to the server by calling the SubmitChanges method on the domain context.

    To add new entities, you can add them to the domain context’s Timeslots property.

    Alternatively, if you create a relationship between the new entity and some other (does not need to be a Timeslot) then the new entity will be dragged into the domain context and included in the next call to SubmitChanges.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Rad Grid and Rad Date Picker.Everything is working fine on development
This is the 2nd time I push my code, and it says Everything up-to-date.
I just installed everything needed for Ruby on Rails on my Ubuntu system. But,
I'm starting to write some unit test for my javascript code using qunit and
Everything in my code works, its getting input from file, computing average, and outputting.
I'm using Pinax to create a new project. For this project I needed to
My Station is configured to EU Location format for date: dd/mm/yyyy Everything is working
Imagine I store everything on the server according to the server's date. However, when
I have some code that tries to parse a date string. When I do
Are there any up to date articles comparing JSF 2 and Tap 5? Everything

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.