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 7566847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:30:57+00:00 2026-05-30T14:30:57+00:00

Am calling an existing wcf service to select records once the record is pulled

  • 0

Am calling an existing wcf service to select records once the record is pulled over thru wcf i do my logic(kinda upload),once its done i have to update the record in the DB.

Here is the way am calling the wcf service

 GatewayService.ServiceClient proxy = new ServiceClient("IService");

        SearchCriteria criteria = new SearchCriteria();
        criteria.UserRoles = new string[]{"*"};


        var stories = proxy.GetStoryItemsByCriteria(criteria);

        var programs = proxy.GetPrograms();

        var readyToDistribute = from story in stories
                                where story.Submitted
                                        && story.Status == "Open"
                                        select story;

        var joined = from story in readyToDistribute
                     join program in programs on story.ProgramId equals program.Id
                     select new StoryProgram(story, program);

        foreach (StoryProgram sp in joined)
        {
            Distribute(sp.Story, sp.Program);
            //update the status here in DB

        }

Below is the WCF Service and Controller details

Below code in the Service

public void UpdateProgram(ProgramData prg)
{
    ServiceController.UpdateProgram(prg);
}

below code in the service Controller

internal static void UpdateProgram(ProgramData prg)
{

    IProgramDAO prgDAO = DataAccessObjectFactory.GetProgramDAO();
    prgDAO.Update(prg);


}

I have the status column in my story table i have to update once the distribute function done.

Any help please.Thanks in Advance

  • 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-30T14:30:58+00:00Added an answer on May 30, 2026 at 2:30 pm

    You would need to add an Update method to your WCF service, and call that, with the new data, to update the DB records.

    Upate

    Given your comment, you should be able to do something like this:

    for each (StoryProgram sp in joined) 
    {
        Distribute(sp.Story, sp.Program);             
    
        // Make any changes you need to sp.Program 
    
        proxy.UpdateProgram(sp.Program);  
    } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to StuctureMap and I am writing a WCF service. In the existing
I've got a WPF windows client that calls a WCF web service. The user
I presume , such a mode should exist. Just triggering WCF service and exiting.
So I am calling $api->lists(); on an existing account and it returns an array
I'm trying to make a call to a remote WCF service from within an
.NET 3.5, VS2008, WCF service using BasicHttpBinding I have a WCF service hosted in
we start activity and do not calling finish() on existing activity it keeps existing
Just out of curiosity, why does calling IEnumerable.ToList() on an existing List not return
I have a validation script (calling out its parent script) that I would like
I am currently calling a web service that returns a service defined class which

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.