{"id":15003303,"url":"https://github.com/dkolzenov/efcore-samples","last_synced_at":"2026-02-03T14:01:36.118Z","repository":{"id":228103633,"uuid":"550940481","full_name":"dkolzenov/efcore-samples","owner":"dkolzenov","description":"Entity Framework Core providers sample","archived":false,"fork":false,"pushed_at":"2022-11-19T19:45:58.000Z","size":113,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-23T11:52:37.609Z","etag":null,"topics":["asp-net-core","efcore","migrations","ms-access","ms-sql-server","mysql","oracle","postgresql","sqlite"],"latest_commit_sha":null,"homepage":"","language":null,"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/dkolzenov.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-10-13T15:15:36.000Z","updated_at":"2022-11-06T13:29:56.000Z","dependencies_parsed_at":"2024-03-17T05:39:03.457Z","dependency_job_id":"3570cabc-3143-4162-ba68-51a21d5f527d","html_url":"https://github.com/dkolzenov/efcore-samples","commit_stats":null,"previous_names":["dkolzenov/efcore-samples"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dkolzenov/efcore-samples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkolzenov%2Fefcore-samples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkolzenov%2Fefcore-samples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkolzenov%2Fefcore-samples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkolzenov%2Fefcore-samples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dkolzenov","download_url":"https://codeload.github.com/dkolzenov/efcore-samples/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkolzenov%2Fefcore-samples/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29047064,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T10:09:22.136Z","status":"ssl_error","status_checked_at":"2026-02-03T10:09:16.814Z","response_time":96,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["asp-net-core","efcore","migrations","ms-access","ms-sql-server","mysql","oracle","postgresql","sqlite"],"created_at":"2024-09-24T18:57:53.685Z","updated_at":"2026-02-03T14:01:36.103Z","avatar_url":"https://github.com/dkolzenov.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Entity Framework Core providers sample\n\n### ★ Put a star if the repository was useful ★\n\n##\n\n### The repository was created as a demonstration of working with various database providers using ORM Entity Framework Core\n\n## Providers\n* [SQLite](https://www.sqlite.org)\n* [MS SQL Server](https://www.microsoft.com/en-us/sql-server)\n* [MySQL](https://www.mysql.com)\n* [PostgreSQL](https://www.postgresql.org)\n* [Oracle](https://www.oracle.com/database)\n* [MS Access](https://www.microsoft.com/en-us/microsoft-365/access)\n\n[Learn more about supported database providers for Entity Framework Core](https://learn.microsoft.com/en-us/ef/core/providers)\n\n## Configuring migrations\n\n1. After opening terminal (command line), install dotnet ef tool (if it is not already installed) by entering the following command:\n`dotnet tool install --global dotnet-ef`\n\n2. Make sure that correct connection string is entered in the [appsettings.json](https://github.com/dkolzenov/efcore-samples/blob/main/samples/EFCoreSample.Api/appsettings.json) file ([learn more about connection strings](https://learn.microsoft.com/en-us/ef/core/miscellaneous/connection-strings))\n\n3. From terminal (command line) go to [samples](https://github.com/dkolzenov/efcore-samples/tree/main/samples) directory\n\n4. Command to add migration:\n```bash\ndotnet ef migrations add `Name` --project `Project` --startup-project `StartupProject` --context `Context`\n```\n\n5. Command to update a database:\n```bash\ndotnet ef database update --project `Project` --startup-project `StartupProject` --context `Context`\n```\n\n6. Command to remove migration:\n```bash\ndotnet ef migrations remove --project `Project` --startup-project `StartupProject` --context `Context`\n```\n\n[Learn more about dotnet ef commands and parameters](https://learn.microsoft.com/en-us/ef/core/cli/dotnet)\n\n### Reference for migration commands:\n\n`Name` - The name of the migration.  \n__For example__: `Initial`\n\n`Project` - Relative path to the project folder of the target project. Default value is the current folder.  \n__For example__: `EFCoreSample.Persistence.Sqlite`\n\n`StartupProject` - Relative path to the project folder of the startup project. Default value is the current folder.  \n__For example__: `EFCoreSample.Api`\n\n`Context` - The name of the DbContext class to generate. If the DbContext is only one, then the attribute __is not required__.  \n__For example__: `ApplicationDbContext`\n\n## Connection strings\n\nAll connection strings must be located in the [appsettings.json](https://github.com/dkolzenov/efcore-samples/blob/main/samples/EFCoreSample.Api/appsettings.json) file ([learn more about connection strings](https://learn.microsoft.com/en-us/ef/core/miscellaneous/connection-strings))\n\nConnection string examples:\n* MySQL\n```bash\nserver=localhost;database=EFCoreSample;user=user;password=password\n```\n[more MySQL examples here](https://www.connectionstrings.com/mysql)\n\n* Oracle\n```bash\nUser Id=user;Password=password;Data Source=localhost:5432/EFCoreSample\n```\n[more Oracle examples here](https://www.connectionstrings.com/oracle)\n\n* PostgreSQL\n```bash\nHost=localhost;Port=5432;Database=EFCoreSample;Username=postgres;Password=password\n```\n[more PostgreSQL examples here](https://www.connectionstrings.com/postgresql)\n\n* SQLite\n```bash\nData Source=EFCoreSample.db\n```\n[more SQLite examples here](https://www.connectionstrings.com/sqlite)\n\n* MS SQL Server  \n```bash\nServer=(localdb)\\\\\\\\mssqllocaldb;Database=EFCoreSample;Trusted_Connection=True;\n```\n[more MS SQL Server examples here](https://www.connectionstrings.com/sql-server)\n\n* MS Access  \n```bash\nProvider=Microsoft.ACE.OLEDB.12.0;Data Source=EFCoreSample.accdb;Persist Security Info=False\n```\n[more MS Access examples here](https://www.connectionstrings.com/access)\n\n## Pay attention\nIn this example, the [EFCoreSample.Api](https://github.com/dkolzenov/efcore-samples/tree/main/samples/EFCoreSample.Api) project is connected to all database providers at once, which is basically impossible in a real project:\n`one project cannot contain multiple providers, the code given is just an EXAMPLE of how to initialize a context using different providers`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdkolzenov%2Fefcore-samples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdkolzenov%2Fefcore-samples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdkolzenov%2Fefcore-samples/lists"}