Skip to content

C# console application

Link edited this page Feb 28, 2024 · 8 revisions

Create a C# console application with Blueprint41

This topic contains a step-by-step introduction to building a simple C# .NET console application with Blueprint41.

Prerequisites

A simple console application

Begin by creating a "MovieGraph" project solution. Follow these steps:

  1. Launch Visual Studio. Select File > New > Project from the menu bar. In the New Project* dialog, search the Blueprint41 project template, select Blueprint41 for Neo4j Application and click Next.

image

In the Project Name text box, type "MovieGraph" and click the Create button.

Create Project

  1. Visual Studio uses the Blueprint41 template to create your solution. The Blueprint41 template contains projects, the MovieGraph.Model, MovieGraph.Generated and MovieGraph console application and it has already the Blueprint41.Neo4jDriver NuGet package reference.

image

The MovieGraph.Model project contains a class Datastore which inherits from Blueprint41's DatastoreModel and the MovieGraph.Generated project contains folders (Entities, Nodes, Relationships).

  1. Set the "MovieGraph" console application as startup project, right-click the "MovieGraph" project and click Set as Startup Project. The C# Console Application template automatically creates a class Program with a single method Main. Main is automatically executed by the runtime when it launches the application.

image

You've created the "MovieGraph" console application using the Blueprint41 project template. On the next topics, we'll discuss the step-by-step guide on how to create entities and generating type-safe models.