---
title: "Discussion on \"How I solve the problem of SQL table relation with no foreign key in asp.net core\" | Hashnode"
description: "Discussion on \"How I solve the problem of SQL table relation with no foreign key in asp.net core\". Hi .. \nIntro\nI had a table with Primary Key (let's call it: Subject; Primary Key: Id) respectively.\nIn the other table, there's a column I want to retrieve its count and data. so let's call it (Teacher; Primary key: TeacherId, SubjectId, ClassroomNam..."
url: "https://hashnode.com/posts/how-i-solve-the-problem-of-sql-table-relation-with-no-foreign-key-in-aspnet-core/606cb82ab17dc439b747f64a"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How I solve the problem of SQL table relation with no foreign key in asp.net core](https://bohs.dev/how-i-solve-the-problem-of-sql-table-relation-with-no-foreign-key-in-aspnet-core?utm_source=hashnode&utm_medium=feed)

Hi .. Intro I had a table with Primary Key (let's call it: Subject; Primary Key: Id) respectively. In the other table, there's a column I want to retrieve its count and data. so let's call it (Teacher; Primary key: TeacherId, SubjectId, ClassroomNam...

Apr 6, 2021 · 2 min read · bohs.dev  
Updated May 5, 2021  
Read the article

-   [#hashnodebootcamp](https://hashnode.com/tag/hashnodebootcamp)
-   [#aspnet-core](https://hashnode.com/tag/aspnet-core)
-   [#database](https://hashnode.com/tag/database)
-   [#sql](https://hashnode.com/tag/sql)

## Written by

[Moha Bahusayn](https://hashnode.com/@mbahusayn)

@mbahusayn · Jeddah, Saudi Arabia

  
[View profile](https://hashnode.com/@mbahusayn)

Web Developer

I am a web developer from Jeddah .. Learning is an endless journey, so I keep learning :)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
