Step by Step
The quickstart has only been tested with Visual Studio 2015, it might work with Visual Studio for Mac as well. For Visual Studio Code and using .NET Core and project.json - it will restore all packages and you get to compile and run. But all the artifacts making up the sample is not put into the project folder. This tutorial focuses on the Visual Studio 2015 experience.
Start a new project:
Select .NET Framework 4.6.1 and ASP.NET Web Application, give it a name and click OK:
Select the Empty template:
Manage the NuGet packages for the project:
Browse / Search for Bifrost and find the latest QuickStart package and then click Install:
During installation it will ask you accept licenses, accept these:
You're now ready to run:
You should now see the following result:
Whats in the package
The package consists of configuration code and a sample running through the end to end of Bifrost.
Configurator.cs file is the entrypoint that Bifrost is looking for to configure it all.
You can read more about how you can configure Bifrost here.
ContainerCreator.cs file is where the IoC container is configured.
Bifrost is heavily relying on dependency inversion. And has
been built from the ground up to rely on something providing these dependencies.
index.html is the starting point of the application. Notice the following line:
It represents a navigation frame, explained in detail here.
You can find the
home view in which it is referring to in the
The viewModel for the view is automatically hooked up by convention. Read more about how views work here.
QuickStart depends on other Bifrost packages to get started. It has taken a few decisions for you and is also configured in the simplest way that could possibly work.
The following packages has been pulled in:
|Bifrost||The core of Bifrost|
|Bifrost.JSON||JSON Serializer used throughout - utilizing NewtonSoft.JSON|
|Bifrost.Ninject||Implementation for Ninject - IoC container|
|Bifrost.FluentValidation||Implementation for validation using FluentValidation|