SkillAgentSearch skills...

AdvancedWebAPI

Minimal Web API to advanced data retrieval using pagination, filtering, searching, sorting

Install / Use

/learn @NeckerFree/AdvancedWebAPI

README

<a name="readme-top"></a>

<!-- TABLE OF CONTENTS -->

📗 Table of Contents

<!-- PROJECT DESCRIPTION -->

📖 AdvancedWebAPI <a name="about-project"></a>

AdvancedWebAPI is a .NET Solution that uses a layer architecture to expose a minimal Web API and to validate advanced data recovery using paging, filtering, searching and sorting.

Web API Service:

getAdvancedPeople Method:

Paging:

Paging

Paging Header:

Paging Response Header

Paging in Postman:

Paging Postman

Filtering:

Filtering

Filtering in Postman:

Filtering Postman

Searching:

Searching

Searching in Postman:

Searching Postman

Sorting:

Sorting

Sorting in Postman:

Sorting Postman

DTO Schema:

DTO Schema

getAllPeople Method:

01

🛠 Built With <a name="built-with"></a>

Tech Stack <a name="tech-stack"></a>

.NET Core Minimal API,

<details> <summary>Server</summary> <ul> <li><a href="https://learn.microsoft.com/en-us/aspnet/core/fundamentals/minimal-apis">Minimal API</a></li> </ul> </details> <details> <summary>Database</summary> <ul> <li><a href="https://www.microsoft.com/en-US/download/details.aspx?id=101064">SQL Server</a></li> </ul> </details> <!-- Features -->

Key Features <a name="key-features"></a>

  • EF Core Database First
  • Unit of Work and Repository Patterns
  • Services Dependency Injection
<p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- GETTING STARTED -->

💻 Getting Started <a name="getting-started"></a>

To get a local copy up and running, follow these steps:

Prerequisites

In order to run this project you need:

  • Visual Studio .NET 2022 updated to use NET Core 7
  • SQL Server Database

Setup

  1. Clone this repository to your desired folder:
  cd my-folder
  git clone https://github.com/NeckerFree/AdvancedWebAPI
  1. Download and restore the Adventure Works Database according to your SQL Server version Adventure Works DB

  2. Create a User as db_owner of this batabase

  3. Modify the connection string (AdventureWorksConnection) in the file \AWA.MinApi\appsettings.json to point your database

Install

Install this project with:

  1. Build the solution and assure that doesn't have errors

  2. Set the project AWA.MinApi as default

Usage

To run the project,

  • Start the application (F5)

  • The /swagger/index.html page is displayed

<p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- AUTHORS -->

👥 Authors <a name="authors"></a>

👤 Elio Cortés

<p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- CONTRIBUTING -->

🤝 Contributing <a name="contributing"></a>

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

<p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- SUPPORT -->

⭐️ Show your support <a name="support"></a>

If you like this project please start my project

<p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- ACKNOWLEDGEMENTS -->

🙏 Acknowledgments and references <a name="acknowledgements"></a>

This project is based on the articles published by Code Maze: Paging Filtering Searching Sorting

<p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- FAQ (optional) -->

❓ FAQ (OPTIONAL) <a name="faq"></a>

  • What command are required to Scaffold from Scratch a DB First?

    • Run next commands:
      dotnet add AWA.DataAccess package Microsoft.EntityFrameworkCore.Design
      dotnet add AWA.DataAccess package Microsoft.EntityFrameworkCore.SqlServer
    
      dotnet ef dbcontext scaffold "Data Source=.;Initial Catalog=AdventureWorks2017; User Id=XXUser;Password=XXPWD;Encrypt=False" Microsoft.EntityFrameworkCore.SqlServer --project AWA.DataAccess --output-dir "AWA.Models\Models" --context-dir "AWA.DataAccess\Data" --namespace AWA.Models --context-namespace AWA.DataAccess --context AdventureWorksContext -f --no-onconfiguring
      dotnet tool install --global dotnet-ef
      dotnet tool update --global dotnet-ef 
    
  • How to Implement Unit Of Work and Generic Repository pattern?

<p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- LICENSE -->

📝 License <a name="license"></a>

This project is MIT licensed.

MIT license

<p align="right">(<a href="#readme-top">back to top</a>)</p>
View on GitHub
GitHub Stars31
CategoryDevelopment
Updated3mo ago
Forks8

Languages

C#

Security Score

77/100

Audited on Dec 21, 2025

No findings