ASP.NET MVC (edit)
https://chsakell.com/2013/05/02/4-basic-ways-to-pass-data-from-controller-to-view-in-asp-net-mvc/
https://www.codeproject.com/Articles/476967/What-is-ViewData-ViewBag-and-TempData-MVC-Option
https://weblogs.asp.net/scottgu/asp-net-mvc-3-new-model-directive-support-in-razor
https://daveaglick.com/posts/using-the-same-object-for-server-and-client-view-models
https://www.vkinfotek.com/poco/how-to-create-a-poco-class-in-entity-framework.html
http://rachelappel.com/use-viewmodels-to-manage-data-amp-organize-code-in-asp-net-mvc-applications/
ASP.NET Core Web API & AutoRest
http://michaco.net/blog/TipsForUsingSwaggerAndAutorestInAspNetCoreMvcServices
https://dzone.com/articles/aspnet-core-apis-in-the-fast-lane-with-swagger-and
https://dzimchuk.net/generating-clients-for-your-apis-with-autorest/
https://apievangelist.com/2015/06/06/comparison-of-automatic-api-code-generation-tools-for-swagger/
Ecommerce with ASP.NET MVC
Swagger Swashbuckle
Install-Package Swashbuckle
Install-Package Swashbuckle.Core
Tools
- AutoRest
- cURL
Tài liệu
- About Swagger
- Installing Swashbuckle and adding it to your Project
- Enabling Swagger Doc and UI
- Enabling Swagger to use XML Comments
- Describing Enumerations as Strings
- Getting the Swagger JSON File
- Using the Swagger File with the REST Broker
Hướng dẫn đơn giản
http://wmpratt.com/swagger-and-asp-net-web-api-part-1/
http://wmpratt.com/part-ii-swagger-and-asp-net-web-api-enabling-oauth2/
Swagger Demo Api using ASP.NET Web Api
https://github.com/billpratt/SwaggerDemoApi
Dùng CURL để thực hiện RESTfull API
curl -X POST -H "Content-Type: application/json" -d "{ \"key1\": \"value1\" }" http://localhost:3000/token
curl -i -X POST -H "Content-Type: application/json" -d "{\"key\":\"val\"}" http://localhost:8080/token
curl -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"id":100}' http://localhost/api/postJsonReader.do
Tham khảo
https://restdb.io/docs/rest-api#restdb
NoSQL
restdb.io is a fast and simple NoSQL cloud database service. With restdb.io you get schema, relations, REST API and an efficient multi-user admin UI for working with data.
Our customers use it for backends, business databases, API-first CMS, data collection and much more.
Tủy chỉnh hiển thị trong Swagger
.IncludeXmlComments( … )
.InjectStyleSheet( … )
.InjectJavaScript( … )
Examples
https://test6.vninvoice.net/swagger/
https://test6.vninvoice.net/swagger/v1/swagger.json
Link Hay
https://test6.vninvoice.net/swagger/v2/swagger.json
https://api.myjson.com/bins/10k6cr
https://apimatic.io/ (Manh@Nguyen | manhnv83@gmail.com)
https://apimatic.io/apientity/#!/5afdbe75bf755b1320aeaf93/
Digital Invoice
API dành cho tích hợp
https://apimatic.io/api-docs-preview/5afdbe75bf755b1320aeaf93
.NET Core
Nuget
Install-Package Swashbuckle.AspNetCore
JSON to CSharp
Automatic API Code Generation Tools For Swagger
Code generation tools out there currently
AutoRest
OpenAPI (f.k.a Swagger) Specification code generator. Supports C#, Go, Java, Node.js, TypeScript, Python, Ruby and PHP.
https://github.com/Azure/autorest
Samples
https://github.com/dotnet/samples
Sample code and snippets used in the .NET documentation (repo under construction)
Swagger
https://scotch.io/tutorials/document-your-already-existing-apis-with-swagger
Swashbuckle.Examples
https://github.com/mattfrear/Swashbuckle.Examples
https://mattfrear.com/2016/01/25/generating-swagger-example-requests-with-swashbuckle/
https://mattfrear.com/2015/04/21/generating-swagger-example-responses-with-swashbuckle/
Swashbuckle.AspNetCore
https://github.com/domaindrivendev/Swashbuckle.AspNetCore
Swashbuckle.AspNetCore.Examples
https://github.com/mattfrear/Swashbuckle.AspNetCore.Examples
https://mattfrear.com/2016/01/25/generating-swagger-example-requests-with-swashbuckle/
https://mattfrear.com/2015/04/21/generating-swagger-example-responses-with-swashbuckle/
Console Web API Client
https://docs.microsoft.com/en-us/dotnet/csharp/tutorials/console-webapiclient
https://github.com/dotnet/samples/tree/master/csharp/getting-started/console-webapiclient