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

  • SEARCH
  • Home
  • 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 7432661
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:29:34+00:00 2026-05-29T09:29:34+00:00

I have a question: When I create my custom domain service (to consume 3rd

  • 0

I have a question:

When I create my custom domain service (to consume 3rd party web service) where I use parametrized CRUD methods everything works, except creating a new record.
Lightswitch adds this domain service as a datasource and is able to create a screen for adding new record. When I click the “Save” button in generated application, it correctly calls the Create method on domain service, the record is correctly created by remote web service and the program is leaving the Create method on a domain service. but suddenly the lightswitch calls the default query method, which is non parametrized and returning a IEnumerable in my case.

It seems like Lightswitch is trying to re-read the yet created record to display it. But it does not use a proper ReadOne method, which is correctly prepared, created and even recognized by Lightswitch, because it is able to call it on an other detail screen.

Why does Lightswitch call this [Query(IsDefault=true)] method please?

Thank you for any hints

Gusta Vomacka

  • 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-29T09:29:35+00:00Added an answer on May 29, 2026 at 9:29 am

    The reason LightSwitch requires you to have a default method that takes no parameters is because it threats WCF RIA Services like “database tables” and it will call this method whenever it is trying to show information “in the table”. If you have a filter, it will also attemt to filter the data (for example to get page one it will add “.skip(1).Take(10)” to the call).

    You answer may be to not use a WCF RIA Service in this instance.

    Use this method:

    http://blogs.msdn.com/b/bethmassi/archive/2012/01/30/calling-web-services-to-validate-data-in-visual-studio-lightswitch.aspx

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

Sidebar

Related Questions

Recently I have asked a question about what I should use to create self-contained
I have to create a web page that for the purposes of this question
I have a question on how to create custom View Helpers. I would like,
I have few question in this regard When you create an internet page, does
I have a question regarding dependency injection. say i want to create a class
I have a question about joptionpane. Using JOptionPane.showMessageDialog(...), we can create a message dialog.
I'm new to iPhone development, and I have a question on how to create
The question I have is if it is possible to create a control, similar
I have customised my SeekBar - I use a custom image as the background,
My web application uses document.createEvent and event.initEvent to create custom events of the generic

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.