Giter VIP home page Giter VIP logo

restier-di-sample's Introduction

RESTier-DI-Sample

This is a simple, self-contained example of the right way to do Dependency Injection in a .NET app. It also explains the different ways that RESTier's implementation is incorrect.

This example is fully-functional. Just clone the repo, open in VS, and hit F5, and you should be taken to a working sample, backed by a database with a single table.

Only files tha are absolutely necessary to execute the application are included. If you search for "@robertmclaws:", you'll find my commentary on the different sections and whether or not they are following best practices.

NOTE: Please see Startup.cs for how registration SHOULD take place, and \Controllers\UnusedSampleController.cs for notes on why the current implementation is bad form.

restier-di-sample's People

Watchers

James Cloos avatar Robert McLaws avatar

restier-di-sample's Issues

Restier Sample doesn't build

I'm trying to figure out how to use Restier in an Aspnetcore project (.Net Framework or .Net core). I thought this might be a good place to try to understand how to get things registered. However, the cloned repository doesn't build. I see the following error in startup.cs:

Error CS0117 'EntityFrameworkApi' does not contain a definition for 'RegisterDependencies' RESTier DI Sample e:\Source\Repos\RESTier-DI-Sample\RESTier DI Sample\Startup.cs 25 Active

What am I missing? And is there a sample that shows how to register in an Asp.Net core project?

Jeff.

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.