.NET Core in Action
Dustin Metzgar
  • MEAP began September 2016
  • Publication in Summer 2017 (estimated)
  • ISBN 9781617294273
  • 350 pages (estimated)
  • printed in black & white

.NET Core is what it sounds like. It's a subset of the .NET framework with libraries and runtimes that drastically reduce its footprint, so you can write and run .NET applications more efficiently. In addition to Windows, .NET Core includes runtimes for Mac and Linux, making it a high-productivity cross-platform option for web, cloud, and server-based applications. It's open source and backed by Microsoft, so supported operating systems, CPUs, and application scenarios will continue to grow over time.

.NET Core in Action shows .NET developers how to build professional software applications with .NET Core. You'll start by getting the big picture of how to build .NET Core applications and use the tools. Then you'll learn unit testing, debugging, and logging. You'll also discover simple data access and networking. The last part of the book goes into more advanced topics, like performance profiling, localization, and signing assemblies, that you need to know so you can release your library or application to the world. By the end of this book, you'll be able to convert existing .NET code to work on multiple platforms or start new projects with knowledge of the tools and capabilities of .NET Core.

Table of Contents detailed table of contents

Part 1: Getting Started

1. Why .NET Core?

1.1. Architecting enterprise applications before .NET Core

1.2. If you are a .NET Framework developer

1.2.1. Your .NET apps can be cross—platform

1.2.2. ASP.NET Core outperforms Framework ASP.NET

1.2.3. .NET Core is the focus for innovation

1.2.4. Release cycles are faster

1.3. If you are new to .NET

1.3.1. C# is an amazing language

1.3.2. ASP.NET Core performance is on par with the top web frameworks

1.3.3. .NET Core is not starting from scratch

1.4. What is .NET Core?

1.5. Key .NET Core features

1.5.1. Expanding the reach of your libraries

1.5.2. Simple deployment on any platform

1.5.3. Clouds and containers

1.5.4. ASP.NET performance

1.5.5. Open source

1.5.6. Bring your own tools

1.6. Applying .NET Core to real—world applications

1.6.1. Scaling in response to demand

1.7. Differences from the .NET Framework

1.7.1. Framework features not ported to Core

1.7.2. Subtle changes for .NET Framework developers

1.7.3. Changes to .NET Reflection

1.8. Summary

2. Building Your First .NET Core Applications

2.1. The trouble with development environments

2.2. Installing the .NET Core SDK

2.2.1. Installing on Windows operating systems

2.2.2. Installing on Linux—based operating systems

2.2.3. Installing on OSX

2.2.4. Building .NET Core Docker containers

2.3. Creating and running the "Hello World" console application

2.3.1. You cannot build yet

2.3.2. Running a .NET Core application

2.4. Creating an ASP.NET Core web application from scratch

2.4.1. Adding the Kestrel web server

2.4.2. Create a Startup class to initialize the web server

2.4.3. Run the "Hello World" web application

2.5. Creating an ASP.NET Core website from the template

2.6. Deploying to a server

2.6.1. Publishing an application

2.6.2. Deploying to a Docker container

2.6.3. Packaging for distribution

2.7. Summary

3. Setting up a Project

3.1. Creating .NET projects from the command line

3.2. Clearing up the terminology

3.2.1. Frameworks

3.2.2. Runtimes

3.2.3. Platforms

3.3. CSV parser sample project

3.4. Build options

3.4.1. Defining the entry point of an application

3.4.2. Working with an "include context"

3.4.3. Embedding

3.5. Dependencies

3.5.1. Platform dependencies

3.5.2. Project dependencies

3.5.3. Package dependencies

3.5.4. NuGet package stores

3.6. Frameworks in project.json

3.6.1. Supporting multiple frameworks with your project

3.6.2. Framework imports in project.json

3.7. When is it important to specify runtimes?

3.7.1. Creating a self—contained application

3.8. Summary

4. Unit Testing with xUnit

4.1. Why write unit tests?

4.2. Business day calculator example code

4.3. xUnit — a .NET Core unit testing framework

4.4. Setting up the xUnit test project

4.5. Evaluating truth with xUnit facts

4.6. When it#s impossible to prove all cases, use a theory

4.6.1. Theories with MemberData

4.7. Shared context between tests

4.7.1. Using the constructor for setup

4.7.2. Using Dispose for cleanup

4.7.3. Sharing context with class fixtures

4.7.4. Sharing context with collection fixtures

4.8. Getting output from xUnit tests

4.9. Traits

4.10. Creating xUnit test projects with the .NET CLI template

4.11. Summary

Part 2: Writing Powerful Applications

5. Working with Relational Databases

5.1. Building a custom blog application

5.1.1. Using SQLite for prototyping

5.2. Building a proof-of-concept with SQLite

5.2.1. Creating tables in SQLite

5.2.2. Creating a data access library for blog data

5.3. Specifying relationships in data and code

5.3.1. Adding the Tags and PostTags tables

5.4. Summary

6. Networking

7. Logging

8. Tools and IDEs

9. Debugging

Part 3: Advanced Features

10. Performance and profiling

11. Localizing applications with resources

12. .NET Native

13. Signing Assemblies

14. Multiple frameworks and runtimes


Appendix A: Frameworks and runtimes

Appendix B: xUnit command line options

Appendix C: Build options

What's inside

  • Debugging .NET Core applications
  • Using PerfView to investigate performance issues
  • Enabling localization in a library
  • Creating unit tests with XUnit
  • Converting existing .NET projects to Core
  • Working with relational data stores
  • Interacting with web services
  • Tools for writing .NET Core apps
  • All examples are in C#

About the reader

This book is for developers who are familiar with a C-like language.

About the author

Dustin Metzgar has developed software professionally for 13 years. He has worked for many companies from startups to large enterprises before joining Microsoft. He specializes in performance in both .NET and Azure services and participated in a number of .NET Core projects. Dustin owns several products, including the Windows Workflow Foundation.

Manning Early Access Program (MEAP) Read chapters as they are written, get the finished eBook as soon as it’s ready, and receive the pBook long before it's in bookstores.
MEAP combo $44.99 pBook + eBook
MEAP eBook $35.99 pdf + ePub + kindle

FREE domestic shipping on three or more pBooks