项目作者: metalglove

项目描述 :
Ultrix is a meme website for collecting memes and sharing them with friends on the website.
高级语言: C#
项目地址: git://github.com/metalglove/Ultrix.git
创建时间: 2018-10-25T19:22:14Z
项目社区:https://github.com/metalglove/Ultrix

开源协议:

下载


Ultrix

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.

Getting Started

Use these instructions to get the project up and running.

Prerequisites

You will need the following tools:

Setup

Follow these steps to get your development environment set up:

  1. Clone the repository.
  2. Open PowerShell, connect to your local sqlserver and create a new database:

    1. SQLCMD.EXE -S "(LocalDb)\MSSQLLocalDB" -E
    2. CREATE DATABASE UltrixDb
    3. GO
  3. Create an appsettings.json file at the root of the Presentation layer with the connectionstring to the new database:
    1. {
    2. "Logging": {
    3. "LogLevel": {
    4. "Default": "Warning"
    5. }
    6. },
    7. "AllowedHosts": "*",
    8. "ConnectionStrings": {
    9. "ApplicationDatabase": "Server=(LocalDb)\\MSSQLLocalDB;Database=UltrixDb;",
    10. "InMemoryDatabase": "InMemoryDatabase"
    11. }
    12. }
  4. Next, go to Tools > NuGet Package Manager > Package Manager Console in visual studio, To restore all dependencies:
    1. dotnet restore
    Followed by:
    1. dotnet build
    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.
  5. Next, to add the code first database to your new database (make sure the default project is Ultrix.Persistance):
    1. Add-Migration InitialCreate
    Finally, update the database:
    1. Update-Database
    The 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.
  6. Next, build the solution either by selecting it in the 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.
  7. Once the build has run succesfully, start the website to confirm that the database connection is succesfull either by hitting F5 or go to Debug > Start.
  8. Launch http://localhost:60216/ in your browser to view the website.
  9. For the time being the you need to manually insert a CredentialType for authentication. Run this query (in PowerShell):

    1. USE UltrixDb
    2. GO
    3. INSERT INTO [dbo].[CredentialTypes] ([Code], [Name], [Position]) VALUES ('Email', 'Email', 1)
    4. GO
  10. Now users are able to register and login, have fun!

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.

Usage

Explanation coming soon..

Contributing

PRs accepted.