Open the program.cs file to add code to your application.
Edit the code to ourput the current datetime. Then save the file.
static void Main(string args)
Console.WriteLine("The current time is " + DateTime.Now);
Time to run your application once again!
Great work! Now go and build some .NET apps!
Now let’s create the console application.
dotnet new console -o myApp
Great! Now make your way to the folder and let’s run the application!
Great work! In the next post we’ll edit some code.
Let’s create a .NET console application here.
First download and install the .NET SDK from the Microsoft .NET site.
Next go ahead and check that you’ve installed as expected.
Great work! In the next post we’ll create our own app!
Now it’s time to create the storage account and get the connecting string for our .Net Core app.
First create the storage account by logging in to Azure CLI and place it in the same Resource Group and your Event Hub.
az storage account create \
--resource-group storage-resource-group \
--location westus \
--sku Standard_RAGRS \
Next create the blob account. Go into Azure and select your new storage and create a blob container.
Finally copy the storage connection string for the storage account.
Now in the next post we’ll create our code and receive some Event Hub messages!
Launch Visual Studio 2019 and create a C# .Net Core console app.
Now this first app will be the sender app so note the project and of the solution.
Open the Nuget Package console and add the nuget package as such.
There we go! Now in the next post we’ll write the code and watch our Event Hub update in the portal!
Let’s write some code and work with Azure Event Hubs. You can check out more about it here and here to view all the pre-requisites.
First jump over to the portal to create an Event Hub namespace.
Next go to the Event Hub namespace and create an event hub.
There you go! Next time we’ll download and add the event hub packages in visual studio.