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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T16:25:46+00:00 2026-06-03T16:25:46+00:00

I query-ing this from entity framework using WCF, and i want to use the

  • 0

I query-ing this from entity framework using WCF, and i want to use the data in phone client side, may i know how can i query more than one data type from the WCF function ?

[OperationContract]
string LoginUser(string email, string password);

IService.cs

        public string LoginUser(string email, string password)
    {
        string query = @"SELECT VALUE tblUser FROM MyEntities.tblUsers AS tblUser WHERE tblUser.email = @email AND tblUser.password = @password";
        ObjectParameter[] parameters = new ObjectParameter[2];
        parameters[0] = new ObjectParameter("email", email);
        parameters[1] = new ObjectParameter("password", password);

        using (var context = new SteamKingEntities())
        {
            ObjectQuery<string> results = context.CreateQuery<string>(query, parameters);
            foreach (string result in results)
            {
                if (result != null)
                {
                    return result;
                }
            }
        }
        return null;
    }

IService.svc.cs

        public Login()
    {
        InitializeComponent();
        _serviceClient = new Service1Client();
        _serviceClient.LoginUserCompleted += new EventHandler<LoginUserCompletedEventArgs>(_serviceClient_LoginUserCompleted);

    }

    private void loginBtn_Click(object sender, RoutedEventArgs e)
    {
        _serviceClient.LoginUserAsync(txtEmail.Text, txtPassword.Password);
    }

    private void _serviceClient_LoginUserCompleted(object sender, LoginUserCompletedEventArgs e)
    {

        if (e.Error == null && e.Result != null)
        {
            MessageBox.Show("Welcome " + e.Result + "!");
        }
        else
        {
            MessageBox.Show(e.Error.Message + " Couldn't Login, Please try again =D");
        }
    }

Login.xaml.cs

I want to return the entire table from Entity Framework and allow me to process one by one in Window Phone side.

I guess i need to do some modification to the IService side but i seriously don’t know how because i’m new to phone development and used to Linq to SQL. Can you please guide me on how to make something like type for the return, Please. Thank you.

Update

The error i get There was an error while trying to deserialize parameter http://tempuri.org/:LoginUserResult. Please see InnerException for more details.

i was modified the code into the way stated in WCF Custom Object but i could not deserialize it… i guess the problem came from the WP part, how could i deserialize the result ?

  • 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-06-03T16:25:48+00:00Added an answer on June 3, 2026 at 4:25 pm

    You can use ref or you can use custom-objects

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

Sidebar

Related Questions

I initially create a table using some data loaded from a php mySQL query.
I've written an app that I use as an agent to query data from
I am just starting to use the Entity Framework 4 for the first time
I am querying data from CRM 2011 using FetchXML to build a report in
I'm using Entity Framework 4.1 and I have a one to many relationship. When
I'm writing an application for Windows Azure. I'm using Entity Framework to access SQL
I am using Entity Framework for the first time and noticed that the entities
Say I have a simple query like this: SELECT * FROM topics ORDER BY
I am using Entity Framework , and I am inserting records into our database
I'm using Entity Framework 4.1's code first approach to map a class hierarchy to

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.