GithubHelp home page GithubHelp logo

apiefwithtestsexampleandconsole's Introduction

Simple Ef code first api

using Sql (msSQL) with full di and test example

generating the db

This repo uses code first to generate the db please navigate to datalayer folder and run command

*obviously change the data source userid,password,catalog etc to be what you wan them to be

dotnet-ef database update --connection "Data Source=localhost;Initial Catalog=ExampleDb;user id=sa;password=12345678"

or depending on version and how ef is configured

dotnet ef database update --connection "Data Source=localhost;Initial Catalog=ExampleDb;user id=sa;password=12345678"

If EF is not setup on your machine

if ef has not been setup globally you can do so by running

dotnet tool install --global dotnet-ef

more details here https://docs.microsoft.com/en-us/ef/core/cli/dotnet

Update the appsettings.json

with connection string you have set

update your lauch profile settings

Api has nswag adding

        "launchUrl": "swagger",

will lauch on to the nswag page by default or you can just naviage there after load http(s)://locahost:port/swagger

apiefwithtestsexampleandconsole's People

Contributors

mkbmain avatar

Stargazers

JimFyyc avatar x_coding avatar Memsworth avatar

Watchers

 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.