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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:24:00+00:00 2026-06-13T08:24:00+00:00

I am creating a simple application where clients need to talk to a server

  • 0

I am creating a simple application where clients need to talk to a server in order to perform simple tasks. The server consists of a database and a WCF service. The clients connect to the service and to the database.

I am using ado.net entity data model to create CRUD operations on the database. I will like to have the clients create CRUD operations through the service and avoid having the clients connect to the database.

when I create methods on the service that return entity objects I get an exception. For example I have the method:

    public Data.Scheduling[] GetSchedules()
    {
        Data.TCEntities1 entities = new Data.TCEntities1();

        var a = entities.Schedulings.ToArray();

        return a;
    }

I don’t want to recreate the Schedulings class and other entity classes in order to make my methods work. How will I be able to expose create, read, update and delete operations through my wcf class library service without having the clients connect to the database?

Edit

More explanation of my problem in case it is confusing:

In my server application (wcf service) I have basic functionality plus the ado.net entity data classes. Because I have the ado.net entity data classes I am able to extract results from the database very easily such as by doing:

    Data.TCEntities1 entities = new Data.TCEntities1();
    var a = entities.Schedulings.ToList(); // schedulings is a table in my database

as you can see these line will retrieve all scheduling rows from the table schedulings in the database and It will be essay to work with (I will have a List ). Why do I get an error if I have my wcf service return a List<Data.Scheduling> ? I want to prevent the clients from queering the database as they just perform very simple operations (database has only 2 tables).

  • 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-13T08:24:01+00:00Added an answer on June 13, 2026 at 8:24 am

    WCF works by exposing contracts. Because you use ADO.NET datamodel, you will get auto generated ‘partial’ classes. These are not marked with the DataContract or DataMember which is required by WCF to let them work on the client side. One way or another, you need to copy your partial class into a new class/file and add the attributes so they will show up on the client.

    [DataContract]
    public partial class Entity1
    {
        [DataMember]
        public int Id { get; set; }
    
        [DataMember]
        public string Property1 { get; set; }
    
        [DataMember]
        public string Property2 { get; set; }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on creating a simple MCV application, in order to understand MVC better.
I am creating my first, very simple RMI client-server application. Here is the code:
I am creating a simple HTTP client/server application on my local machine but I
I'm creating simple Socket server. Flex application will be client for this server. On
I am creating a simple application in Silverlight 5 to test another application's ability
I am creating a simple application with Django. I realized that I am doing
I am creating a simple application using the MVC design pattern where my model
I am creating a simple application in JSP- JDBC for inserting and updating details
Was creating a simple console application to do some prototyping and was shocked to
I am creating a simple RSS application and I am not that good in

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.