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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:21:14+00:00 2026-05-13T14:21:14+00:00

I have a table in my database called Task. Task has the following fields:

  • 0

I have a table in my database called “Task”. Task has the following fields:
– ID
– Description
– AssignedUserID
– TaskTypeID

I am accessing this table through a class that was created automatically after I used an ADO.NET Entity Data Model. I can load and show the fields mentioned above in a DataGrid in my Silverlight application. However, AssignedUserID and TaskTypeID are not very descriptive. So I decided to create a stored procedure that gets the tasks and the user and task type names through their respective lookup tables. This is where the problem lies.

I want to create some custom properties in the automatically generated “Task” class. The custom properties would be named “AssignedUserName” and “TaskType”. I then want to make these properties available to my Silverlight client. However, I cannot seem to figure out how to get them exposed to my Silverlight client.

Can someone help?
Thank you

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

    If your EDM is in the same project as the DomainService you can do this:

    create a partial class on the Entity type, and add your calculated property in there.

    name the file **.shared.cs

    it will then be auto-shared with the client/Silverlight code.


    Edit:
    I was assuming that you could do this calculation in app logic rather than use an sp, which seems more straightforward to me.

    If you do use an SP, you’ll need to use the Function Import feature in the designer to map the SP to a function in the EDM. This function can then return entities, with properties mapped however you like.

    An easier way would be to just use the object model: Have Task.AssignedUser and Task.TaskType objects off of your Task class. Map these to lookup tables in your db. This will work out-of-the box (assuming the Id’s are FK’s to those lookup tables).

    So, a couple options:

    1. use app-logic–properties in a partial class to return the descriptions
    2. use the object model driven by FKs to lookup tables, then just access Task.AssignedUser.Name or Task.TaskType.Description
    3. use a function import to access the SP and map the returned values to entity properties

    1 or 2 being the best options IMHO.

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

Sidebar

Ask A Question

Stats

  • Questions 288k
  • Answers 288k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I don't think there are attributes for these fields. That… May 13, 2026 at 5:24 pm
  • Editorial Team
    Editorial Team added an answer This is a bug in the VS2008 SP1 debugger. MS… May 13, 2026 at 5:24 pm
  • Editorial Team
    Editorial Team added an answer I don't have that tab either but I found a… May 13, 2026 at 5:24 pm

Related Questions

I have a couple of tables in my database, one called Task , and
I have a table called OffDays, where weekends and holiday dates are kept. I
I have a process where an incoming user request to our system is being
The project I am working on requires some executions to be done at a
I'm still learning about REST and, in my test, came up with this scenario

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.