{"id":19654201,"url":"https://github.com/aimenux/repositorypatterndemo","last_synced_at":"2025-08-10T07:16:07.343Z","repository":{"id":222564620,"uuid":"735066916","full_name":"aimenux/RepositoryPatternDemo","owner":"aimenux","description":"Using repository pattern with entity framework in web api projects","archived":false,"fork":false,"pushed_at":"2024-02-17T14:57:34.000Z","size":44,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-27T01:54:31.455Z","etag":null,"topics":["efcore","integration-tests","net80","repository-pattern","unit-of-work-pattern","unit-tests"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aimenux.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2023-12-23T14:46:20.000Z","updated_at":"2024-02-14T23:17:09.000Z","dependencies_parsed_at":"2024-02-17T15:49:26.885Z","dependency_job_id":null,"html_url":"https://github.com/aimenux/RepositoryPatternDemo","commit_stats":null,"previous_names":["aimenux/repositorypatterndemo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aimenux/RepositoryPatternDemo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aimenux%2FRepositoryPatternDemo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aimenux%2FRepositoryPatternDemo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aimenux%2FRepositoryPatternDemo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aimenux%2FRepositoryPatternDemo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aimenux","download_url":"https://codeload.github.com/aimenux/RepositoryPatternDemo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aimenux%2FRepositoryPatternDemo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269690621,"owners_count":24459874,"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","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["efcore","integration-tests","net80","repository-pattern","unit-of-work-pattern","unit-tests"],"created_at":"2024-11-11T15:16:37.422Z","updated_at":"2025-08-10T07:16:07.238Z","avatar_url":"https://github.com/aimenux.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![.NET](https://github.com/aimenux/RepositoryPatternDemo/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/aimenux/RepositoryPatternDemo/actions/workflows/ci.yml)\n\n# RepositoryPatternDemo\n```\nUsing repository pattern with entity framework in web api projects\n```\n\nIn this repo, i m exploring various ways of using repository pattern in web api projects\n\u003e\n\u003e :heavy_minus_sign: `Example01` use controller api with directly the db context\n\u003e\n\u003e :heavy_minus_sign: `Example02` use minimal api with directly the db context\n\u003e\n\u003e :heavy_minus_sign: `Example03` use controller api with specific repository\n\u003e\n\u003e :heavy_minus_sign: `Example04` use minimal api with specific repository\n\u003e\n\u003e :heavy_minus_sign: `Example05` use controller api with generic repository\n\u003e\n\u003e :heavy_minus_sign: `Example06` use minimal api with generic repository\n\u003e \n\u003e :heavy_minus_sign: `Example07` use controller api with generic repository \u0026 specific unit of work\n\u003e\n\u003e :heavy_minus_sign: `Example08` use minimal api with generic repository \u0026 specific unit of work\n\u003e\n\u003e :heavy_minus_sign: `Example09` use controller api with generic repository \u0026 generic unit of work\n\u003e\n\u003e :heavy_minus_sign: `Example10` use minimal api with generic repository \u0026 generic unit of work\n\u003e \n\u003e In order to setup the database, follow these steps for some example :\n\u003e - Run this docker command : `docker run -e ‘ACCEPT_EULA=Y’ -e ‘SA_PASSWORD=Pa55w0rd’ -p 1433:1433 -d mcr.microsoft.com/mssql/server`\n\u003e - Use this connection string : `\"Data Source=localhost;Initial Catalog=BooksDB;User Id=sa;Password=Pa55w0rd;TrustServerCertificate=True;\"`\n\u003e - Run database migrations : `dotnet-ef database update`\n\u003e \n\n**`Tools`** : net 8.0, ef-core, xunit, fluent-assertions ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faimenux%2Frepositorypatterndemo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faimenux%2Frepositorypatterndemo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faimenux%2Frepositorypatterndemo/lists"}