.NET Core Analysis
.NET Core 1.0.1
| Module | Component | .NET Core |
| MongoDB | MongoDB.Driver | There has a nuget package available v2.3.0. |
| Json | Newtonsoft.Json |
If you are working with Mvc, Newtonsoft.Json has been included by default.
|
| Logging | Logging |
public class HomeController : Controller |
| Logging | NLog.RabbitMQ | There are no nuget packages available, and in the library [MethodImpl(MethodImplOptions.Synchronized)] and Delegate.CreateDelegate are not supported by .NET Core also. |
| Logging | NLog.Targets.ElasticSearch | There are no nuget packages available, but I created one myself. |
| Mailing | Mandrill | There are no nuget packages availabe, but you can use SMTP or a small webjob without .NET Core. |
| Azure Storage | WindowsAzure.Storage |
There has a nuget package available v7.2.1. BUT... https://github.com/Azure/azure-storage-net/blob/master/README.md#odata This version depends on three libraries (collectively referred to as ODataLib), which are resolved through the ODataLib (version 5.6.4) packages available through NuGet and not the WCF Data Services installer which currently contains 5.0.0 versions. The ODataLib libraries can be downloaded directly or referenced by your code project through NuGet. The specific ODataLib packages are:
|
| Azure ServiceBus | WindowsAzure.ServiceBus | There are no nuget packages availabe. |
| Identity | Microsoft.AspNet.Identity.Core | There has a nuget package available. |
| Identity | Microsoft.AspNet.Identity.Owin | There has a nuget package available. |
| Configuration (It's a big improvement for unit testing.) | Configuration |
appsettings.json {
C# public class LoggingConfig |
|
Configuration (Switch build configuration was a hell but not an ymore.) |
Configuration per environment |
You can copy appsettings.json per environment, e.g. appsettings.development.json, appsettings.staging.json, appsettings.production.json The default code template already support this see the below code: .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true)
Based on IHostingEnvironment you can do all the magic public class HomeController : Controller How to switch the environment?
In the end the environment variables will be saved into launchSettings.json Based on the below command you can switch the environment easily dotnet run --environment "Staging" How are we going to do with the automatically deployment?
You can add a slot setting via Azure portal see the below screenshot
|
| IoC | Dependency injection |
public class Startup TransientTransient lifetime services are created each time they are requested. This lifetime works best for lightweight, stateless services. ScopedScoped lifetime services are created once per request. SingletonSingleton lifetime services are created the first time they are requested (or when How to replace the default services container? public class Startup |
| Unit Tests | MSTest |
"MSTest.TestFramework": "1.0.5-preview" |
| Unit Tests | xUnit |
project.json {
|
| Integration tests | Microsoft.AspNetCore.TestHost |
There has a nuget package available v1.0.0. |
| Integration tests | Microsoft.AspNet.WebApi.Client |
There has a nuget package available v5.2.3. |
| Globalization and localization |
https://docs.asp.net/en/latest/fundamentals/localization.html http://andrewlock.net/adding-localisation-to-an-asp-net-core-application (Very interesting even with a localized view) |
.NET Core Analysis的更多相关文章
- 【python】使用flask制作小型页面的关键点总结
目录结构 app.py web代码 store.db 存储信息的轻量数据库,用的sqlite3 schema.sql 数据库的初始化建表语句 settings.cfg 配置信息 static/styl ...
- jacoco统计server端功能测试覆盖率
jacoco可以统计,功能测试时,server代码调用的覆盖情况.这里对服务器端的java代码进行统计. 操作步骤如下: 第一步:更改server的启动脚本,使用jacocoagent.jar ...
- ChIP-seq 核心分析 下游分析
http://icb.med.cornell.edu/wiki/index.php/Elementolab/ChIPseeqer_Tutorial [怪毛匠子 整理] ChIP-seq[核心分析 下游 ...
- Importing/Indexing database (MySQL or SQL Server) in Solr using Data Import Handler--转载
原文地址:https://gist.github.com/maxivak/3e3ee1fca32f3949f052 Install Solr download and install Solr fro ...
- 按需要对Androguard进行定制增强
按需对Androguard进行增强和定制修改 Androguard是一个对android应用程序进行分析的基于python的平台,功能强大.但是在使用的过程中,提供的功能不一定如我们所需,所以需要进行 ...
- Solr 6.7学习笔记(03)-- 样例配置文件 solrconfig.xml
位于:${solr.home}\example\techproducts\solr\techproducts\conf\solrconfig.xml <?xml version="1. ...
- HubbleDotNet 使用类
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Hubble.S ...
- lucene-5.3.1配置(win7x64)
lucene下载地址:http://www.us.apache.org/dist/lucene/java/5.3.1/lucene-5.3.1.zip 下载之后解压 控制台应用程序下配置: 找到luc ...
- Solr基础知识二(导入数据)
上一篇讲述了solr的安装启动过程,这一篇讲述如何导入数据到solr里. 一.准备数据 1.1 学生相关表 创建学生表.学生专业关联表.专业表.学生行业关联表.行业表.基础信息表,并创建一条小白的信息 ...
随机推荐
- (iOS)Base64加密和DES加密、以及JAVA和iOS中DES加密统一性问题
我们在项目中为了安全方面的考虑,通常情况下会选择一种加密方式对需要安全性的文本进行加密,而Base64加密和DES64加密是常用的加密算法.我记得我在前一个项目中使用的就是这两种加密算法的结合:Bas ...
- 你应该在开始API开发之前知道的事(下)(翻译)
放了十多天,一直在玩没写,今天终于要把坑填完了.有部分没翻,主要是一般都用不上的,有兴趣的朋友可以自己翻下. 上篇地址 :http://www.cnblogs.com/Scohura/p/357360 ...
- NAT概述
引言 私有IP是无法在因特网上使用的,而如今普遍使用的宽带网络(ADSL)最多所能提供给用户的IP为16个,最少则为一个,万一企业内部有50台计算机要同时连接上因特网,该如何解决呢?这个问题的正确解决 ...
- Unity: Passing Constructor Parameters to Resolve
In this tutorial we will go through of couple different ways of using custom constructor parameters ...
- php数组操作的基本函数
数组的键名和值array_values($arr);获得数组的值array_keys($arr);获得数组的键名array_flip($arr);数组中的值与键名互换(如果有重复前面的会被后面的覆盖) ...
- *HDU3172 并查集
Virtual Friends Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)T ...
- weinre targets none 的问题
安装了weinre之后,target 老是是none.问题就是处在localhost或者127.0.0.1. 因为手机或者虚拟机要通讯,相当于另外一台电脑,用localhost怎么能实现通讯嘛.得用本 ...
- Django URL name详解
我们基于上一节的代码来开始这一节的内容. 上节源代码:zqxt_views(django 1.4 - django 1.10).zip [更新于 2016-09-06 00:13:23] 1. 打开 ...
- python字符串前面加r
在Python的string前面加上'r', 是为了告诉编译器这个string是个raw string,不要转意backslash '\' . 例如,\n 在raw string中,是两个字符,\和n ...
- weblogic的下载安装及myeclipse的配置
weblogic的下载可以参考:http://jingyan.baidu.com/article/c910274b94e179cd371d2d7c.html 安装及myeclipse的配置参考:htt ...


