Introduction to GenericServices

GenericServices is a .NET class library which helps a developer build a service layer, i.e. a layer that acts as a facard/adapter between your business/data service layers and your User Interface or HTTP service. It does this by providing standard database CRUD (Create, Read, Update and Delete) methods and a standard way of calling business methods, each with clear extension points. The aim is to cut out the standard boiler-plate code so the user only has to write the data or business specific code.

Some ASP.NET MVC specific features which build on the GenericService are also included. For instance the best way to call GenericService commands in a Controller and handling long-running tasks.

Summary of the features covered by this example web site

1. Simple, but robust database services

Database accesses are normally a big part of enterprise systems build with APS.NET MVC. However, my experience is that creating these services in a robust and comprehensive form can lead to a lot of repetative code that does the same thing, but for different data. The aim of the GenericFramework framework is to handles all of the standard cases, and include extension points for when special handling is required. Examples of there use on this web site are:

Note that the SampleMvcWebApp uses AutoFac dependency injection framework to insert calls to the various GenericServices services.