Git Product home page Git Product logo

dotnet-rpg's Introduction

Dotnet RPG

Project from this blog post here

Prerequisites

Description

This is an API for a Role Playing Game.

SQLServer Setup with Docker

Open a Terminal window and run the following command to Download SQL Server

sudo docker pull mcr.microsoft.com/mssql/server:2019-latest

Run the following command to launch an instance of the Docker image you just downloaded:

docker run -d --name sql_server_demo -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=reallyStrongPwd123' -p 1433:1433 mcr.microsoft.com/mssql/server:2019-latest

But of course, use your own name and password. Also, if you downloaded a different Docker image, replace mcr.microsoft.com/mssql/server:2019-latest with the one you downloaded

If you get the following error at this step, try again, but with a stronger password.

Microsoft(R) SQL Server(R) setup failed with error code 1. Please check the setup log in /var/opt/mssql/log for more information.

Run the following command to install the sql-cli command line tool. This tool allows you to run queries and other commands against your SQL Server instance.

sudo npm install -g sql-cli

Connect to SQL Server using the mssql command, followed by the username and password parameters.

mssql -u sa -p reallyStrongPwd123

You should see something like this:

Connecting to localhost...done

      sql-cli version 0.6.0
      Enter ".help" for usage hints.
      mssql>

Restore dependencies specified in the project

dotnet restore

Build project

dotnet build

Run migrations

dotnet ef database update

Run project

dotnet run

Run the project in development

dotnet watch run

Author

  • Ryan Wire

Notes

Create the database

Run the following commands:

dotnet tool install --global dotnet-ef
dotnet add package Microsoft.EntityFrameworkCore.Design
dotnet ef migrations add InitialCreate
dotnet ef database update

Create a migration

dotnet ef migrations add initialMigration

Undo migrations

dotnet ef migrations remove

Set user secrets

dotnet user-secrets set "InitialCatalog" ""
dotnet user-secrets set "UserID" "" 
dotnet user-secrets set "Password" "" 

List user secrets

dotnet user-secrets list  
```

dotnet-rpg's People

Contributors

raywire avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.