Ultrix is a meme website for collecting memes and sharing them with friends on the website.
Ultrix is a meme website for collecting memes and sharing them with friends on the website.
For this project the MoSCoW method was used, this can be found in the Projects tab on this repository.
Use these instructions to get the project up and running.
You will need the following tools:
Follow these steps to get your development environment set up:
Open PowerShell, connect to your local sqlserver and create a new database:
SQLCMD.EXE -S "(LocalDb)\MSSQLLocalDB" -E
CREATE DATABASE UltrixDb
GO
appsettings.json
file at the root of the Presentation layer with the connectionstring to the new database:
{
"Logging": {
"LogLevel": {
"Default": "Warning"
}
},
"AllowedHosts": "*",
"ConnectionStrings": {
"ApplicationDatabase": "Server=(LocalDb)\\MSSQLLocalDB;Database=UltrixDb;",
"InMemoryDatabase": "InMemoryDatabase"
}
}
Tools > NuGet Package Manager > Package Manager Console
in visual studio, To restore all dependencies:Followed by:
dotnet restore
To make sure all dependencies were added succesfully, it should build without dependency warnings else you have probably not installed .NET core 2.2 SDK.
dotnet build
Finally, update the database:
Add-Migration InitialCreate
The
Update-Database
Add-Migration
command scaffolds a migration to create the initial set of tables for the entities in the Persistance layer. The Update-Database
command creates the database and applies the new migration to it.Build > Build solution
in visual studio or hitting CTRL + SHIFT + B
or if you are still in the package manager console by typing dotnet build
.F5
or go to Debug > Start
.For the time being the you need to manually insert a CredentialType
for authentication. Run this query (in PowerShell):
USE UltrixDb
GO
INSERT INTO [dbo].[CredentialTypes] ([Code], [Name], [Position]) VALUES ('Email', 'Email', 1)
GO
NOTE: For the tests each method will create its own database with a random GUID and delete itself after completion of the test. This is done so that it can run in parallel and each test does not depend on anything. Because InMemoryDatabase is not yet a relational-database provider some tests will use the repository instead of the service to make the tests work as intended.
Explanation coming soon..
PRs accepted.