Skip to content

omgyukiel/MVC_CityInfoAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 

Repository files navigation

README

An MVC REST API which returns information about Cities - built from scratch.

The purpose of this project is to learn the fundamnetal of ASP.NET Core Web APIs with MVC.

I work professionally at a large enterprise company that primarily uses .NET. After working for a year, despite being a top performer- I still found myself to have low confidence in standing anything up from scratch within my own ecosystem. This seems to be a side-effect of working in a large, legacy codebase. Rarely do I create and design an entire feature end to end - anything I build is created on top of layers and layers of legacy code which abstracts the fundamentals away.

It bothers me a lot that I can deliver full-stack React projects but I wouldn't have a clue as to where to start with .NET; it's time to fix that.

Goals:

  • register API and stand up web server
  • create API and return resources using the MVC pattern
  • add CRUD endpoints
  • use inversion of control and DI to register mail service
  • log exceptions w/Serilog
  • register in-memory datastore via DI
  • add scoped configuration files
  • migrate in memory database to SQL Lite w//Entity Framework Core
  • seed database
  • introduce resository pattern to controllers
  • add automapper mapped DTOs
  • create, update, patch, delete resources with repository and deferred execution (expression trees)
  • convert all in memory controllers to use EF
  • add search, filtering, and paging in API
  • add jwt tokens
  • add authenticated API
  • add policy based access control
  • version api
  • document api with OpenAPI/Swashbuckle
  • deploy on azure

Note, some API and DB designs best practices are considered - but the techiques and patterns employed are non-exhaustive. Since this project is meant to practice fundamentals, care for explicit scalability in the API is not implmeented.

About

A .NET MVC Rest API that returns information about Cities

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages