{"id":24554019,"url":"https://github.com/fkucukkara/aspireworkshop","last_synced_at":"2025-04-16T00:19:37.226Z","repository":{"id":269551805,"uuid":"907749162","full_name":"fkucukkara/aspireWorkshop","owner":"fkucukkara","description":"This project is a .NET 9 API built as an Aspire Playground, showcasing several best practices.","archived":false,"fork":false,"pushed_at":"2025-02-09T13:12:33.000Z","size":18119,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-29T03:11:47.926Z","etag":null,"topics":["aspire","csharp","entity-framework-core","generic-repository","minimal-api","netcore-webapi","unitofwork-pattern"],"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/fkucukkara.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":"2024-12-24T09:44:42.000Z","updated_at":"2025-02-09T13:12:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"1a7705c8-2523-4c09-b8c2-c23af8bc13ee","html_url":"https://github.com/fkucukkara/aspireWorkshop","commit_stats":null,"previous_names":["fkucukkara/aspireworkshop"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fkucukkara%2FaspireWorkshop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fkucukkara%2FaspireWorkshop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fkucukkara%2FaspireWorkshop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fkucukkara%2FaspireWorkshop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fkucukkara","download_url":"https://codeload.github.com/fkucukkara/aspireWorkshop/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249173713,"owners_count":21224585,"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":["aspire","csharp","entity-framework-core","generic-repository","minimal-api","netcore-webapi","unitofwork-pattern"],"created_at":"2025-01-23T02:17:06.019Z","updated_at":"2025-04-16T00:19:37.206Z","avatar_url":"https://github.com/fkucukkara.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Aspire Workshop\n\n## Overview\nThis project is a **.NET 9 API** built as an **Aspire Playground**, showcasing best practices for implementing:\n\n- **Generic Repository Pattern**\n- **Unit of Work Pattern**\n- **SQL Server** integration with **Entity Framework Core**\n\nThe project serves as a learning and experimentation ground for advanced .NET development concepts, including clean architecture, reusable data access patterns, and efficient database transactions.\n\n## Features\n- **Aspire Framework**: Provides a robust foundation for building APIs.\n- **Generic Repository**: A flexible data access abstraction for performing common CRUD operations.\n- **Unit of Work**: Manages transactional consistency across multiple operations.\n- **Entity Framework Core**: Simplifies interaction with SQL Server.\n- **.NET 9 API**: Leverages the latest features and improvements in .NET 9.\n\n## Description\nThe **Generic Repository** encapsulates common database operations like adding, updating, deleting, and retrieving entities. It promotes reusability and separation of concerns by abstracting data access logic from business logic.\nThe **Unit of Work** ensures that all database changes made during a single operation are committed or rolled back as a unit, maintaining data integrity.\n\n### Key Components:\n1. **`IRepository` Interface**: Defines common data access methods.\n2. **`GenericRepository` Implementation**: Provides a base class for data access.\n3. **`IUnitOfWork` Interface**: Coordinates repository operations within a single transaction.\n4. **`UnitOfWork` Implementation**: Manages repositories and commits changes to the database.\n\nThis project uses **Entity Framework Core** for ORM, providing a simple yet powerful mechanism for interacting with SQL Server databases.\n\n## Prerequisites\n- .NET 9 SDK\n- SQL Server\n- Visual Studio 2022 or a compatible IDE\n\n## How to Run\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/fkucukkara/aspireWorkshop.git\n   ```\n\n2. Restore dependencies:\n   ```bash\n   dotnet restore\n   ```\n\n3. Apply migrations and update the database (just in case):\n   ```bash\n   dotnet ef migrations add InitialCreate\n   dotnet ef database update\n   ```\n\n4. Run the application:\n   ```bash\n   cd src\\aspireWorkshop.AppHost\n   dotnet run\n   ```\n\n## How to Access the Database\nThe connection string `ConnectionStrings__sqlDb` is available in the Aspire Dashboard under the aspireworkshop-api project details section.\n\n## License\n[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n\nThis project is licensed under the MIT License, which allows you to freely use, modify, and distribute the code. See the [`LICENSE`](LICENSE) file for full details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffkucukkara%2Faspireworkshop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffkucukkara%2Faspireworkshop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffkucukkara%2Faspireworkshop/lists"}