. NET Standard 2.0 and. NET Core2.0 official version of the online introduction

Source: Internet
Author: User
Tags dotnet

I. Net Standard 2.0 Introduction

Official documents: Https://blogs.msdn.microsoft.com/dotnet/2017/08/14/announcing-net-standard-2-0/?utm_source=vs_developer_ News&utm_medium=referral

The. NET 2.0 standard specification is now complete. It is supported in the. NET Core 2.0,.net Framework 4.6.1 and later, and in Visual Studio 15.3. You can start using. NET Standard 2.0.

. NET standard is used to share code.. NET Standard is a set of APIs, all. NET implementations must provide standards-compliant APIs. It's unified. NET implementation and to prevent future fragmentation. It replaces the Portable class Library (PCLS) as a tool for building a. Net library that works everywhere. Larger API surface: We have more than one set of available APIs from 13K in the. NET 1.6 standard to 32K in the. NET 2.0 standard. Most are the existing. NET Framework APIs. These additions make it easier to migrate existing code to. NET Standard, and any. NET implementations that extend to. NET Standard, such as. NET Core 2.0 and the upcoming UWP version.. NET Framework Compatibility mode: Most Nu The get package is still currently targeted at the. NET Framework. Many projects are currently blocked from moving to. NET Standard because not all projects are dependent on. NET Standard. That's why we added compatibility mode, which allows. NET standard projects to refer to the. NET Framework library. Although this may not be valid in all cases (for example, if the. NET Framework binaries use WPF), we find that 70% of all the NuGet packages on the nuget.org are compatible with. NET Standard 2.0.   So in practice, it blocks a lot of projects. Wide range of platform support. The following platforms support. NET Standard 2.0:. NET Framework 4.6.1. NET Core 2.0 Mono 5.4 xamarin.ios 10.14 Xamarin.mac 3.8 xamarin.android 7.5 Upcoming UWP versions (expected to be shipped later this year) Ii.. Net Core2.0 Introduction

Official documents: Https://blogs.msdn.microsoft.com/dotnet/2017/08/14/announcing-net-core-2-0/?utm_source=vs_developer_news &utm_medium=referral

The. NET core 2.0 includes major improvements that make. NET core easier to use and more capable as a platform. The following improvements are the biggest improvements, and others are described in the main body of this article. Please share feedback and any problems you have encountered in dotnet/core#812. Major performance improvements for run time and framework implementation. NET Standard 2.0 supports 6 new platforms, including Debian Stretch,suse Linux Enterprise Server SP2 and MacOS High Sie Rra Ryujit is the x86 JIT Linux and Windows ARM32 in. NET Core 2.0, which can now be generated in the preview. SDK dotnet Restore is now an implied command.. NET core and. NET Standard projects can refer to the. NET Framework NuGet packages and projects.. NET Core The SDK can build source code from source code. relationships with. NET Core 1.0 and 1.1 applications

You can install. NET Core 2.0 on machines that have. NET Core 1.0 and 1.1. Your 1.0 and 1.1 applications will continue to use the 1.0 and 1.1 runtime, respectively. Unless you explicitly update your application, they will not advance to the 2.0 runtime. Performance Improvements

The. NET Core 2.0 has many performance improvements. The team details some of the improved posts that describe the. NET Core Runtime. NET core performance improvements the performance improvement of Ryujit in the. NET cores and the. NET Framework. Profile guided optimizations in. NET Core 2.0 Introduction to asp.net core 2.0

Official website Document: https://blogs.msdn.microsoft.com/webdev/2017/08/14/announcing-asp-net-core-2-0/

When you enter dotnet new, these same templates can also be used in the Open box on the command line:

Razor Support c#7.1

The razor engine has been updated to use the new Roslyn compiler, which includes support for c#7.1 features such as default expressions, inferred tuple names, and pattern matching with generics. simplifies application Host configuration

The host configuration has been greatly simplified, and a new Webhost.createdefaultbuilder is included in the default ASP.net core template that automatically assigns a kestrel server that will attempt to run on IIS. and configure the standard console logging provider. Your Program.cs file can only be simplified for this content:

This reduces the likelihood of accidental damage to some of the standard configurations that most developers have not changed in their asp.net core applications. Why you can write the same boilerplate code over and over again, when it can be simplified to 3 lines of code. iv. entityframework Core 2.0 official documents: https://blogs.msdn.microsoft.com/dotnet/2017/08/14/ announcing-entity-framework-core-2-0/

The Entity Framework (EF) Cor E is a lightweight, extensible, and cross-platform version of the Entity Framework, which is. NET's popular object/relational mapping (O/RM) framework.

dotnet Add Package Microsoft.entityframeworkcore.sqlserver-v 2.0.0
What is the new feature of this release?

The following are some of the most salient features of the EF Core 2.0: . NET Standard 2.0

The EF core is now targeted at the new. NET Standard 2.0. The latter defines shared surface areas over 32,000 APIs, spanning the. NET framework,.net Core,mono,xamarin and the upcoming universal Windows platform. With. NET Standard 2.0, developers can reuse their code and skills on a variety of platforms, application types, and devices.

For detailed instructions on using the EF Core 2.0 on each platform, refer to our platform support documentation. improving LINQ translation

In many cases, queries are more efficient in the EF Core 2.0. For example, we have increased the number of patterns that can be converted to SQL, so many queries that trigger client evaluations in previous releases will no longer be executed in 2.0. like query operators

You can now use EF.Functions.Like () in a LINQ query and, if necessary, it will be converted to like or evaluated in memory. For example, the following query:

var customers = from C into context
    . Customers
    where EF. Functions.like (C.name, "a%");
    Select C;

Be translated as follows:

SELECT [C]. [Id], [C]. [Name]
From [Customers] as [c]
WHERE [c].[ Name] Like N

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.