Chuyển đến nội dung chính

Bài đăng

Đang hiển thị bài đăng từ Tháng 7, 2017

Hướng dẫn tạo Self-Certificate trong IIS

Trong bài viết này, mình sẽ hướng dẫn các bạn cách tạo file Certificate dùng trong môi trường development. Có rất nhiều cách để tạo file certifcate (pfx). Tuy nhiên, mình thấy sử dụng Internet Information Services (IIS) Manager là dễ dàng nhất. Đầu tiên, bạn cần kiểm tra xem IIS đã được cài đặt vào máy tính chưa. Nếu chưa, bạn cần cài đặt IIS trong Program and Features

Awesome .NET!

A collection of awesome .NET tools SharpDevelop   - A free IDE for .NET programming languages MonoDevelop   - MonoDevelop is a cross platform IDE mostly aimed at Mono/.NET developers Visual Studio Express   - The free lightweight version of Visual Studio for .NET programming. Visual Studio Community   - A full-Featured IDE - Free Waf DotNetPad   - A simple and fast code editor that makes fun program with C# or Visual Basic. Visual Studio Code   - Excellent free editor from Microsoft, based on GitHub Atom. Ionide   - An Atom Editor and Visual Studio Code package suite for cross platform F# development. Rider   - A cross-platform C# IDE based on the IntelliJ platform and ReSharper RoslynPad   - A simple C# editor based on Roslyn and AvalonEdit. Consulo   - A cross-platform IDE with C# & Java support, fork of IntelliJ IDEA Community Edition

Entity Framework Core: Sử dụng Migrations

Trong bài viết này, mình sẽ hướng dẫn các bạn sử dụng tính năng EF Core migration để quản lý sự thay đổi của model và cập nhật database. Để tìm hiểu thêm về CodeFirst Migration, bạn tham khảo bài viết: Tìm hiểu về Code First and Migration

Sử dụng Token với Swagger UI (SwashBuckler)

Trong bài viết này, mình sẽ hướng dẫn các bạn thêm hàm đăng nhập (operation) /token và cách đính kèm token trong mỗi request từ Swagger. Nếu bạn chưa biết cách sử dụng Swagger, bạn tham khảo thêm bài viết: Thêm Swagger vào Web API Thêm 1 operation token vào document Mặc định hàm đăng nhập để lấy token sẽ không được hiển thị trong Swagger. Nếu muốn hiển thị hàm đăng nhập, bạn phải tùy chỉnh IDocumentFilter. Interface IDocumentFilter được định nghĩa như sau: public interface IDocumentFilter { void Apply(SwaggerDocument swaggerDoc, SchemaRegistry schemaRegistry, IApiExplorer apiExplorer); }