Creating your first Orleans application
It is time for us to create our first Orleans application. In this section, we are going to build a simple hotel grain, which will greet a guest. A typical Orleans solution structure contains a host application (it could be a console application, a web application, or a native application) that has the Orleans runtime and hosts grain activations, grain interfaces, and grain implementations.
Let's follow these steps to create our first Orleans solution:
Step 1: Create solution:
- Create a new solution using the template Blank Solution in Visual Studio and name it
Distel
.
Step 2: Define grain interfaces: Grain interfaces define the different types of grains involved and their behavior:
- Add a new project to this solution using the project template Class Library, name it
Distel.Grains.Interfaces
, and select the target framework .NET6. - To this project, add the following NuGet references:
Microsoft.Orleans.CodeGenerator...