Skip to content

michael-wolfenden/WebApiMovieRest

Repository files navigation

WebApi Movie Rest

WebApi Movie Rest is a sample ASP.NET Web API application providing a restful interface for maintaining imdb movie records.

  • Uses Entity Framework for persistence
  • Uses Simple Injector for IOC
  • Supports both json and xml media types specified either in the content-type header or at the end of the uri (uri.json or uri.xml)
  • Responses follow the JSON API ID style
  • BDD style unit and integration tests
  • Uses a request / response / handler style of architecture
  • Uses SwaggerUI for documentation

Building & Running

Connection strings

There are two configuration files that need to be modified before running this application

  • src\IntegrationTests\App.config - The connection string in this configuration file points to the database used for the integration tests. This database will be deleted / re-created each time the integration tests are run so make sure the database name is different from the database name used for the application (below).

  • src\Web\Web.config - The connection string in this configuration file points to the database used for the application.

Building from a command prompt or powershell

> build.bat

Cleans and builds the application then runs the unit tests followed by the integration tests. The tests will generate reports in the "build" directory.

Building from Visual Studio

Simply open the solution file and press F5 (Debug -> Start Debugging). You can use your favourite Visual Studio test runner (i.e. resharper) to run the unit and integration tests.

Todo

  • Implement Http Caching with CacheCow
  • Implement Http Compression
  • Support paging and sorting

3rd Party Libraries

  • ASP.NET Web API - ASP.NET Web API is a framework that makes it easy to build HTTP services that reach a broad range of clients, including browsers and mobile devices. | License

  • CuttingEdge.Conditions - CuttingEdge.Conditions is a library that helps developers to write pre- and postcondition validations in their C# 3.0 and VB.NET 9.0 code base. | License

  • Entity Framework - Entity Framework (EF) is an object-relational mapper that enables .NET developers to work with relational data using domain-specific objects | License

  • Fluent Assertions - Fluent Assertions is a set of .NET extension methods that allow you to more naturally specify the expected outcome of a TDD or BDD-style test | License

  • FluentValidation - A small validation library for .NET that uses a fluent interface and lambda expressions for building validation rules. | License

  • NSubstitute - A friendly substitute for .NET mocking frameworks. | License

  • psake - psake is a build automation tool written in PowerShell. | License

  • ServiceStack - Service Stack is a high-performance .NET web services platform that simplifies the development of high-performance REST. | License

  • Simple Injector - The Simple Injector is an easy-to-use Inversion of Control library for .NET and Silverlight. | License

  • Swagger-UI - Swagger UI is a dependency-free collection of HTML, Javascript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API. | License

  • xbehave.net - A BDD/TDD framework based on xUnit .net and inspired by Gherkin. | License

  • xUnit.net - xUnit.net is a free, open source, community-focused unit testing tool for the .NET Framework. | License

License

Licensed under the terms of the New BSD License

About

WebApi Movie Rest is a sample ASP.NET Web API application providing a restful interface for maintaining imdb movie records.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published