{"id":25871724,"url":"https://github.com/erossini/blazorapiefcore","last_synced_at":"2026-04-11T22:44:32.097Z","repository":{"id":278278585,"uuid":"935098881","full_name":"erossini/BlazorAPIEFCore","owner":"erossini","description":"Example of using Entity Framework Core via APIs with complex objects","archived":false,"fork":false,"pushed_at":"2025-02-23T21:51:15.000Z","size":801,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-01T23:07:28.195Z","etag":null,"topics":["blazor","csharp","entity-framework-core","minimal-api"],"latest_commit_sha":null,"homepage":"https://puresourcecode.com/dotnet/net9/apis-with-entity-framework-core/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/erossini.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":"FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"erossini"}},"created_at":"2025-02-18T22:43:08.000Z","updated_at":"2025-02-23T21:51:19.000Z","dependencies_parsed_at":"2025-02-18T23:39:27.186Z","dependency_job_id":null,"html_url":"https://github.com/erossini/BlazorAPIEFCore","commit_stats":null,"previous_names":["erossini/apiefcore"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erossini%2FBlazorAPIEFCore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erossini%2FBlazorAPIEFCore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erossini%2FBlazorAPIEFCore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erossini%2FBlazorAPIEFCore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erossini","download_url":"https://codeload.github.com/erossini/BlazorAPIEFCore/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241472227,"owners_count":19968352,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blazor","csharp","entity-framework-core","minimal-api"],"created_at":"2025-03-02T07:23:28.548Z","updated_at":"2026-04-11T22:44:32.026Z","avatar_url":"https://github.com/erossini.png","language":"HTML","funding_links":["https://github.com/sponsors/erossini"],"categories":[],"sub_categories":[],"readme":"# Using Entity Framework Core via APIs with complex objects\n\nI want to give a complete example of minimal APIs in Blazor with Entity Framework Core with complex objects. I always struggle to have a solution working when my model has dependencies with other object. Here I show my test and my code. The code is in [NET9](https://puresourcecode.com/category/dotnet/net9/). In the [Microsoft documentation](https://learn.microsoft.com/en-us/aspnet/core/data/ef-mvc/update-related-data?view=aspnetcore-9.0), there are some examples but it is not complex enough. A few days ago, [I posted about another problem](https://puresourcecode.com/dotnet/net9/pendingmodelchangeswarning-with-net9/) I had with NET9 and Entity Framework Core.\n\n## Posts\n\nThis code is related to the following posts:\n\n- [APIs with Entity Framework Core](https://puresourcecode.com/dotnet/net9/apis-with-entity-framework-core)\n- [APIs with Entity Framework Core: POST](https://puresourcecode.com/dotnet/csharp/apis-with-entity-framework-core-post/)\n- [APIs with Entity Framework Core: PUT](https://puresourcecode.com/dotnet/net7/apis-with-entity-framework-core-put/)\n\n## Why this project\n\nLet me show a real database I'm working on. As you can see I have a few tables but not all of them are coming strictly from the code. The tables `Clients`, `ClientAddresses` and `tbl_Channels` are created from the `Domain`. `ChannelClient` is a joined table that Entity Framework Core is creating automatically.\n\n![image](https://github.com/user-attachments/assets/b8496939-fd06-4c00-a558-0582311dc89d)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferossini%2Fblazorapiefcore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferossini%2Fblazorapiefcore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferossini%2Fblazorapiefcore/lists"}