Code Monkey home page Code Monkey logo

effective-guacamole's Introduction

effective-guacamole

[Andre Lopes] Building a multi layer .NET Core 3.0 API from zero

Grab the article at https://medium.com/swlh/building-a-nice-multi-layer-net-core-3-api-c68a9ef16368

Tips/Run

  • Running the project - at https://localhost:5001 - through Swagger ('Swashbuckle.AspNetCore', version 5.0.0-rc3) ("dotnet run -p MyMusic.Api/MyMusic.Api.csproj");

Errors Experienced

  • My powershell terminal in VSCode installed dotnet-ef but wouldn't run it even after uninstalling ("dotnet tool uninstall --global dotnet-ef") and targeting a specific latest build ("dotnet tool install --global dotnet-ef --version 3.*"), it was evidently running successfully outside of VSCode and in a normal PS terminal;
  • I ended up having to install 'Microsoft.EntityFrameworkCore.Design' into the Api project also ("dotnet add MyMusic.Api/MyMusic.Api.csproj package Microso;ft.EntityFrameworkCore.Design")

Notes:

  • EntityFramework Core is no longer consumed from with "dotnet cli", a global installation to my environment was applied for use within the project via "dotnet tool install --global dotnet-ef";
  • The dependency injected here was marked as Scoped. There are 3 types of dependency injection:
    • Transient — "Objects are different. One new instance is provided to every controller and every service"
    • Scoped — "Objects are same through the request"
    • Singleton — "Objects are the same for every request during the application lifetime"

What's it all about?

  • Let's build together a multi layer .NET Core API with the latest framework version and most used patterns

Thanks

Thanks goes out to Andre Lopes for the FREE stuff!

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.