Giter Club home page Giter Club logo

csharp-mvc-with-postgresql's Introduction

C# WebAPI MVC with a Postgres Database.

Use the MVC pattern with Entity Framework to communicate with a Postgres database Create an API which has a database behind it.
Use Database Migrations and C# classes to create and model the database

Instructions Fork this repository Clone your fork to your machine Open the project in Visual Studio

Core Exercise

Look at the OpenAPI schema below, your task is to set up a remote Postgres Database on ElephantSQL and connect to it from your code. Your Swagger should have all CRUD functionality for the Employee Model.

The database table for Employees will be something like this:

Field Type Information
id Serial PK
name VARCHAR(250)
jobName VARCHAR(250)
salaryGrade VARCHAR(10)
department VARCHAR(50)

You should use C#, EntityFramework the Postgres ElephantSQL.

Add tests as usual to test the functionality of the Model layer, you do not need to test the repository code directly.

Here is the spec for the Core Criteria: Core Spec

Extension Exercise

Add in the rest of the Schema based on the OpenAPI Spec linked below, modify the original Employee table to use Foreign Keys as appropriate based on the two new tables you will create, you can use EntityFramework to help run the migrations and populate the tables.

Add in models and other classes to enable API calls to be made which will match the endpoints specified in the schema.

Here is the spec for the Extension Criteria: Extension Spec

csharp-mvc-with-postgresql's People

Contributors

uerbzr avatar valentinagal 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.