An open API service indexing awesome lists of open source software.

https://github.com/profjordanov/news-rest-service

Xamarin Android client and REST service based on ASP.NET Core Web API, Entity Framework Core and SQL Server that holds news.
https://github.com/profjordanov/news-rest-service

asp-net-core-web-api entity-framework-core news newsapi sql-server-database

Last synced: 12 days ago
JSON representation

Xamarin Android client and REST service based on ASP.NET Core Web API, Entity Framework Core and SQL Server that holds news.

Awesome Lists containing this project

README

        

# News REST Service

REST service based on ASP.NET Core Web API, Entity Framework Core and SQL Server that holds news.

## Client Applications:

- [x] ASP.NET Core MVC
- [x] Xamarin Android

## Endpoints:
- [x] GET /api/news – returns all news ordered by publish date.
- [x] POST /api/news – creates a news item by given title, content and publish date.
- [x] PUT /api/news/{id} – updates an existing news item by given id (given in the request URL) and title, content and publish date.
- [x] DELETE /api/news/{id} – deletes an existing news item by given id.

## Features:

- [x] AutoMapper
- [x] EntityFramework Core with SQL Server and ASP.NET Identity
- [x] JWT authentication/authorization
- [x] File logging with Serilog
- [x] Stylecop
- [x] Neat folder structure

```
├───src
│ ├───configuration
│ └───server
│ ├───News.Api
│ ├───News.Business
│ ├───News.Core
│ ├───News.Data
│ └───News.Data.EntityFramework
└───tests
└───News.Business.Tests

```
- [x] Swagger UI + Fully Documented Controllers

![swagger-ui](https://devadventures.net/wp-content/uploads/2018/06/swagger-ui-new.png)

- [x] Global Model Errors Handler

![model-errors](https://devadventures.net/wp-content/uploads/2018/05/model-errors.png)
- [x] Global Environment-Dependent Exception Handler

Development

![exception-development](https://devadventures.net/wp-content/uploads/2018/06/exception-development.png)

Production

![enter image description here](https://devadventures.net/wp-content/uploads/2018/05/exception-production.png)
- [x] Neatly organized solution structure

![solution-structure](https://devadventures.net/wp-content/uploads/2018/05/solution-structure.png)
- [x] Thin Controllers

![thin-controllers](https://devadventures.net/wp-content/uploads/2018/05/tight-controllers.png)

- [x] Robust service layer using the [Either](http://optional-github.com) monad.

![either-monad](https://devadventures.net/wp-content/uploads/2018/05/either-monad.png)

- [x] Safe query string parameter model binding using the [Option](http://optional-github.com) monad.

![optional-binding](https://devadventures.net/wp-content/uploads/2018/05/option-binding-4-1.png)

### Test Suite
- [x] xUnit
- [x] Autofixture
- [x] Moq
- [x] Shouldly
- [x] Arrange Act Assert Pattern

![enter image description here](https://devadventures.net/wp-content/uploads/2018/05/sample-test.png)