.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 学生相关表 创建学生表.学生专业关联表.专业表.学生行业关联表.行业表.基础信息表,并创建一条小白的信息 ...
随机推荐
- ASP.Net 在Update Panel局部刷新后 重新绑定JS方法
我们知道Asp.Net中的Update Panel可以完成页面的局部刷新(实质上是Ajax),但是局部刷新完后,此区域的控件上所绑定的JS方法就会失效,因为我们用如下方法来重新绑定. var prm ...
- ajax 传递JSON对象参数
https://msdn.microsoft.com/zh-cn/library/cc836466(v=vs.94).aspx https://msdn.microsoft.com/zh-cn/lib ...
- MVC和WebForm 中国省市区三级联动
MVC和WebForm是微软B/S端的两条腿,两种不同的设计理念,相对来说MVC更优于WebForm对于大数据的交互,因为WebForm是同一时间传输所有数据,而MVC它只是传输所用到的数据,更精确, ...
- android--asp.net webservice 返回json
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.We ...
- 冰球项目日志2-yjw
我们小组在12.31号进行了讨论,确定了基本的任务及分工,后面是元旦放假,大家没有做很多的东西,我也是把自己分工的部分方案想了下. 后面在1.3号,我们会再进行一次小组讨论,确定下最终的方案,然后进行 ...
- 关于Openlayer3的菜鸟认识
什么是OpenLayers? OpenLayers 是一个专为Web GIS 客户端开发提供的JavaScript 类库包,用于实现标准格式发布的地图数据访问.从OpenLayers2.2版本以后,O ...
- 实现倒计时功能js
<p>系统将会在<strong id="endtime"></strong>秒后跳转到登录页!</p> [原生js实现] <s ...
- .net core 基本概念
asp.net core 是基于 .net core的,所以能够跨平台. 目前存在.NET Framework (CLR), .NET Core (CoreCLR) or Mono,可根据项目的具体情 ...
- java强制类型转换
在Java项目的实际开发和应用中,常常需要用到将对象转为String这一基本功能.本文将对常用的转换方法进行一个总结.常用的方法有Object.toString(),(String)要转换的对象,St ...
- CSS实现元素水平/垂直居中的方法
首先,我们来了解水平居中,它有很多种方法,我们暂时先来了解其中的几种: 1. 在实现方案中,我们最熟悉的莫过于给元素定义一个宽度,然后使用margin: 1 2 3 4 body{ wi ...


