autofac &web api 切换数据库
https://stackoverflow.com/questions/24188025/is-there-another-way-of-changing-database-instance-in-autofac WebAPI: Retrieve GET parameter from Controller Constructor The constructor is invoked too early, you can't access the parameters from there. However, you can override the Initialize method and retrieve the GET parameters from the context: protected override void Initialize ( HttpControllerContext controllerContext ) { foreach ( var parameter in controllerContext . Request . GetQueryNameValuePairs ()) { Debug . WriteLine ( string . Format ( "{0} = {1}" , parameter . Key , parameter . Value