Skip to content

Instantly share code, notes, and snippets.

View sitsh's full-sized avatar

wilsonjw sitsh

  • ebitoo
  • shagnhai
View GitHub Profile
@sitsh
sitsh / ContentType.cs
Created January 2, 2019 03:59 — forked from scottoffen/ContentType.cs
C# ContentType Enum full source code
using System;
using System.Reflection;
namespace Grapevine
{
public enum ContentType
{
[Metadata(Value = "application/x-authorware-bin", IsBinary = true)]
AAB,
@sitsh
sitsh / generate_dto.sql
Last active July 12, 2018 02:20 — forked from gemyago/generate_dto.sql
TSQL script to generate POCO/DTO from database table
DECLARE @tableName NVARCHAR(MAX), @schemaName NVARCHAR(MAX), @className NVARCHAR(MAX)
--------------- Input arguments ---------------
SET @tableName = 'Incidents'
SET @schemaName = 'dbo'
SET @className = 'IncidentDto'
--------------- Input arguments end -----------
DECLARE tableColumns CURSOR LOCAL FOR
SELECT cols.name, cols.system_type_id, cols.is_nullable FROM sys.columns cols

笔记记录下 swagger 配置过程 quote from

We migrated a project to ASP.NET Core 2 (preview) and needed to configure swagger.

In ASP.NET Core v1 we used this code to load the auto generated xml file into swagger:

services.ConfigureSwaggerGen(options =>
http://35.176.254.4:8000
http://btsha.com:41017
http://47.104.167.217
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using System.Web.Http;