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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T00:23:47+00:00 2026-05-12T00:23:47+00:00

I am doing the below test to try and learn more about LINQ to

  • 0

I am doing the below test to try and learn more about LINQ to SQL.

I have got an Activities table which contains an activityId, parentId, type.

The type is used as a discriminator value, to say whether it is an activity, task or project.

I have an Activity, Task and Project class that inherit from Activity, it seems wrong for Task to inherit from Project semantically but to reduce redundant data it seemed a better way to do it, I may either change the name of that class or separate them.

Activity class does not have a parentId property but the Task class will use the parentId as a projectId to associate to the Project class.

I have attached a screenshot of the tables and my dbml as well as a class diagram, you can see from the class diagram it is only a simpler implementation I am not having sub-activities, tasks across diff projects, etc. I am also ignoring the user side of this sytem because it is only a prototype.. so ignore the manager class and I wont be using roles.. I am only using hardcoded test users.

I have a list of things I wanted to ask about.
1. My tasks all require a projectId since this is the parentID from the activity class.. how is this setup to work with the Project class? as you can see there is no association between them at the moment.. should I be creating a property for Project? how does that work when ActivityId is potentially also the projectID when it comes to the Project class?

  1. You can see an ActivityTime class that should only be for tracking time spent on a task, you can see this can be associated to the UserActivity table but I am wondering how this is done only for Tasks and not for all Activities?

  2. You can also see a project activity, sorry this class should also be inheriting from the Activity class I missed this when uploading the image. This is for such things as a milestone where an activity with no related time or user should still have a related project.

Anyone got any ideas on what I am trying to achieve? am I going too far with all of this? Thanks for any help 🙂 Sorry if there is not enough detail I was trying to keep it brief without going into a full list of the business requirements I had in mind for this test system.

EDIT: Just stating the obvious I’m sure but please copy the image location to take a better look.

alt text http://img134.imageshack.us/img134/1199/tmss.jpg

  • 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-12T00:23:48+00:00Added an answer on May 12, 2026 at 12:23 am

    I came up with a solution to this using the entity diagram for LINQ to SQL as shown above.

    Where I created a base activity abstract class that activity, task, project and project activity inherit from.

    Also the entity diagram seems to require you to add properties to inherited classes just to be able to use them for associations between classes. So in the end I did just that and made the original activityId from the base activity class a private property.

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

Sidebar

Ask A Question

Stats

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

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

    • 7 Answers
  • Editorial Team

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

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The same Wikipedia page that you linked to has a… May 13, 2026 at 10:00 am
  • Editorial Team
    Editorial Team added an answer You may cheat this with ISNULL(Price + Taxes, 0) which… May 13, 2026 at 10:00 am
  • Editorial Team
    Editorial Team added an answer How do you run multiple JVMs on a single machine?… May 13, 2026 at 10:00 am

Related Questions

I am actually trying to start a process for winzip and zip a folder.
I am doing some performance tests using .Net 3.5 against SQL Server. I am
I am trying to host a WCF service, using NetTcpBinding in a Windows service.
I'm trying to generate a proxy class with WCF which, when serialized, converts and

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.