Title: Unrelated tables join and query · Issue #491 · EntityGraphQL/EntityGraphQL · GitHub
Open Graph Title: Unrelated tables join and query · Issue #491 · EntityGraphQL/EntityGraphQL
X Title: Unrelated tables join and query · Issue #491 · EntityGraphQL/EntityGraphQL
Description: I want abilty to query 2 tables like sql join, Those2 tables wont have any relationshp in the table. I have generated models cs files and dbcontext.cs file using EF command automatically. SELECT C.CCode, C.CName, P.PCode, P.PName FROM Cl...
Open Graph Description: I want abilty to query 2 tables like sql join, Those2 tables wont have any relationshp in the table. I have generated models cs files and dbcontext.cs file using EF command automatically. SELECT C....
X Description: I want abilty to query 2 tables like sql join, Those2 tables wont have any relationshp in the table. I have generated models cs files and dbcontext.cs file using EF command automatically. SELECT C....
Opengraph URL: https://github.com/EntityGraphQL/EntityGraphQL/issues/491
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Unrelated tables join and query","articleBody":"I want abilty to query 2 tables like sql join, Those2 tables wont have any relationshp in the table. I have generated models cs files and dbcontext.cs file using EF command automatically.\n\nSELECT C.CCode, C.CName, P.PCode, P.PName \nFROM Client C\nINNER JOIN Product P ON C.MCode = P.MCode AND C.CCode = P.CCode....\n\nI have this code in startup.cs\npublic void ConfigureServices(IServiceCollection services)\n {\n try\n {\n \n // Register IHttpContextAccessor\n services.AddHttpContextAccessor();\n\n // Register DBContext with IHttpContextAccessor\n services.AddDbContext\u003cDBContext\u003e((serviceProvider, options) =\u003e\n {\n var httpContextAccessor = serviceProvider.GetRequiredService\u003cIHttpContextAccessor\u003e();\n var connection = new SqlConnection(GetConnectionString(httpContextAccessor));\n\n // var creds = new Azure.Identity.DefaultAzureCredential();\n // var token = creds.GetToken(new Azure.Core.TokenRequestContext(new[] { \"https://database.windows.net/.default\" }));\n // connection.AccessToken = token.Token;\n\n options.UseSqlServer(connection);\n });\n\n int DefaultPageSize = Configuration.GetValue\u003cint\u003e(\"DefaultPageSize\");\n int MaxPages = Configuration.GetValue\u003cint\u003e(\"MaxPages\");\n\n services.AddGraphQLSchema\u003cDBContext\u003e(provider =\u003e\n {\n provider.OnFieldCreated = (field) =\u003e\n {\n if (field.ReturnType.IsList \u0026\u0026 field.ReturnType.SchemaType.GqlType == GqlTypes.QueryObject \u0026\u0026 !field.FromType.IsInterface)\n {\n field.UseFilter().UseSort().UseOffsetPaging(defaultPageSize: DefaultPageSize, maxPageSize: MaxPages);\n }\n };\n });...\n..............\n.........\n}.....\nhow and where I make these 2 tables related? what files would require changes? Client.cs, product.cs or dbcontext.cs or startup.cs?\n ","author":{"url":"https://github.com/santhidhanuskodi23","@type":"Person","name":"santhidhanuskodi23"},"datePublished":"2026-01-13T11:07:05.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/491/EntityGraphQL/issues/491"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:3b878d8b-6b91-44ce-e704-dcfb43e47e7d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8B30:255D99:724E084:9BE6B75:69787BC8 |
| html-safe-nonce | 25f3ac880d7a587b0f046ee2d8eaa8819df4c3306b0a7478059ae0b493fe8cda |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QjMwOjI1NUQ5OTo3MjRFMDg0OjlCRTZCNzU6Njk3ODdCQzgiLCJ2aXNpdG9yX2lkIjoiMTU4NjE2NTQxNDU1MzQ4NDIzMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8da929c93c047f2a512b9ccd1b4197f7bacc07259e35bb9af1c2bfef3d813f4c |
| hovercard-subject-tag | issue:3808350042 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/EntityGraphQL/EntityGraphQL/491/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6a4d2d8b1deefc0b35585b5d1e6e4bac061f194b252c9a9506a116f3e3798332/EntityGraphQL/EntityGraphQL/issues/491 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6a4d2d8b1deefc0b35585b5d1e6e4bac061f194b252c9a9506a116f3e3798332/EntityGraphQL/EntityGraphQL/issues/491 |
| og:image:alt | I want abilty to query 2 tables like sql join, Those2 tables wont have any relationshp in the table. I have generated models cs files and dbcontext.cs file using EF command automatically. SELECT C.... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | santhidhanuskodi23 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2981c597c945c1d90ac6fa355ce7929b2f413dfe7872ca5c435ee53a24a1de50 |
| turbo-cache-control | no-preview |
| go-import | github.com/EntityGraphQL/EntityGraphQL git https://github.com/EntityGraphQL/EntityGraphQL.git |
| octolytics-dimension-user_id | 87887288 |
| octolytics-dimension-user_login | EntityGraphQL |
| octolytics-dimension-repository_id | 38514759 |
| octolytics-dimension-repository_nwo | EntityGraphQL/EntityGraphQL |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 38514759 |
| octolytics-dimension-repository_network_root_nwo | EntityGraphQL/EntityGraphQL |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 520b65a872113b919c1bbdb03834a50af15859fd |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width