Skip to content

This library is used to provide simplified RESTful CRUD apis with: Untyped Crud Controller Untyped Repository. This library allies injection (IoC), minimum codebase for maximum efficiency.

License

bmota/LSG.GenericCrud

 
 

Repository files navigation

LSG.GenericCrud

NuGet NuGet GitHub issues GitHub license

Introduction

This library is used to provide simplified RESTful CRUD apis with a multilayer architecture:

  • Generic Crud Controller
  • Generic Entity Framework Repository.

This library allies injection (IoC), minimum codebase for maximum efficiency.

Obviously, when you are working with databases and entities, you need to write some code to be able to manage these entities. And, when working with multiple kind of entities, you are forced to rewrite code that is similar for each entities. This library is getting rid of the duplicated code and keeps everything DRY.

Enjoy!

Prerequisites

You need:

You also need one of these options below:

What is CRUD?

CRUD stands for Create, Read, Update, Delete

See wikipedia definition.

CRUD is not everything. You can do CRUD in many ways. But, in these days, we (as developers) are more in the JSON and in the REST things... This is what this library is for! Doing RESTful CRUD operations in a simplified way!

Here is a sample of RESTful CRUD URLs for an entity of type Account:

VERB URL Description
GET /api/accounts Retreive all accounts
GET /api/accounts/:id Retreive one account
POST /api/accounts Create one account
PUT /api/accounts/:id Update one account
DELETE /api/accounts/:id Delete one account

Features supported in this library

I've designed this library to be pretty extensible. Here is some features supported and links to further documentation:

Actually unsupported features (feel free to help if you want!):

  • Per entity security policies
  • and more...

Getting started / Tutorials

I am presenting here really simple scenarios, more complex will come:

  • RESTFul CRUD API for Account Entity
    • Using Visual Studio Code (or command line): Tutorial
    • Using Visual Studio (2015 update 3+): Tutorial

Want to have a look to more samples, take a look at these samples: Link

Install this library

If you already know what to do to get up'n'running with this library, use one of these commands to install my NugetPackage:

If using dotnet cli in an existing project

dotnet add package LSG.GenericCrud

If using Package Manager Console (in Visual Studio)

Install-Package LSG.GenericCrud

More super powers!

If you need other features that are not in the base library, you can install these libraries:

Note: There is actually missing documentation on what is included in these libraries. More documentation will come!

Breaking changes

About

This library is used to provide simplified RESTful CRUD apis with: Untyped Crud Controller Untyped Repository. This library allies injection (IoC), minimum codebase for maximum efficiency.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%