Giter Site home page Giter Site logo

bingo_csharp-aspnetcore-mongodb's Introduction

Bingo_csharp-aspnetcore-mongodb

Bingo!

NOTE -
***** The design used in this "service" is really only good for CRUD applications with very little complexity or business logic. *

***** This is meant to be a basic implemenation guide for Mongo, unit testing, integration testing, etc..

Bingo is a RESTful (not really though) API that provides data about fitness.. and fitness related.. stuff...

Tools Used

Mongo DB

Mongo DB C# Driver Library

ASP.NET Core

Deploying Bingo

The following things can be done in any order!

Starting Local Mongo Instance

Deploy MongoDB locally by running the following command in powershell:

From \Bingo_csharp-aspnetcore-mongodb\database >> `start-process start_db.bat`

Mongo will be hosted locally over port `27017` with a connection string of `mongodb//localhost:27017`

You may consider downloading a free MongoDB client from [RoboMongo](https://robomongo.org/)

Deploying API Locally

There are 2 ways to deploy the API:

1. Deploy from visual studio under the *debug* menu.
1. Deploy from command-line using dotnet core build tools

From the directory .\Bingo_csharp-aspnetcore-mongodb\src\Bingo.Api >> `dotnet run`

Running Unit and Integration Tests

**Mongo does not need to be deployed for this to work. Neither does ASP.NET. Pretty much nothing does.**

1. Run them in Visual Studio!
1. If you do not have VS, run tests from command-line with the following:

From the root of the project >> `dotnet test`

Framework dependencies such as mongoDb and ASP.NET core are initialized in-memory or managed entirely by the test harness, for the lifetime of the test execution. No setup required. -- CORRECTION - This implementation is not actually deploying Mongo in-memory, but instead the test harness is just managing the mongo binaries.. .. ..

bingo_csharp-aspnetcore-mongodb's People

Contributors

herchue avatar zachjenkins avatar

Watchers

 avatar  avatar  avatar

bingo_csharp-aspnetcore-mongodb's Issues

Mongo2Go Server remains open after test run

Mongo Server process remains open after test run.

Need to figure out a way to do this during the shared context Dispose.

Current MongoDbRunner.Dispose() method not working as expected. Needs investigation.

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.