--- title: Getting started with .NET Core description: Getting started with .NET Core --- import { Code } from '@astrojs/starlight/components'; import { Aside } from '@astrojs/starlight/components'; import installCode from 'install.sh?raw'; import healthQueryCode from 'health-query.cs?raw'; import programCode from 'program.cs?raw'; export const highlights = ['OpenHarbor.CQRS', 'OpenHarbor.CQRS.AspNetCore.Mvc', 'AddDefaultCommandDiscovery', 'AddDefaultQueryDiscovery', 'AddOpenHarborCommands', 'AddOpenHarborQueries', 'AddQuery', 'IQueryHandler']; In this tutorial, we will create a simple health query within a brand-new .NET 8 Web API project using the Open Harbor CQRS framework. ### Setup Let's get started by creating a brand-new project! ### Install the .NET package Run the following commands to install the required packages: ### Creating our first query We will create a simple health check endpoint to verify that our API is running: ### Preparing our program using MVC to bind our queries and commands `AddDefaultCommandDiscovery` and `AddDefaultQueryDiscovery` are the default implementations in the CQRS framework for discovering the commands and queries defined in your application. To learn more about how they work, you can check out their functionality here. `AddQuery` is used to register your query, allowing the framework to expose it automatically. `AddOpenHarborCommands` and `AddOpenHarborQueries` dynamically generate controllers for your application, leveraging the MVC features of .NET ### Reaping the rewards of our work! Run the project and navigate to `/api/query/health` in your browser to see the result. ### What's next? 🎉 Congratulations! You've successfully created your first CQRS Web API with a simple health check query. In the next guide, we’ll explore adding a command and a query that interact with each other, showcasing the endless possibilities you can unlock with our CQRS framework. Let your imagination run wild!