ASP.NET MVC Using C# – 3 Days
This four-day ASP.NET MVC Using C# course is designed to provide a sound introduction to the .NET Framework for programmers who already know the C# language and the fundamentals of Windows Forms. It is current to Visual Studio 2017, which now includes support for cross-platform development using .NET Core. The course focuses on core portions of the .NET Framework that are common across many application areas. Separate courses are available in specific areas, such as ADO.NET, XML Programming, Windows Presentation Framework, Windows Communications Framework and ASP.NET.
Microsoft .NET is an advance in programming technology that greatly simplifies application development, both for traditional, proprietary applications and for the emerging paradigm of Web-based services. .NET is a complete restructuring of Microsoft’s whole system infrastructure and represents a major learning challenge for programmers developing applications on Microsoft platforms. Part of .NET is a major new object-oriented programming language, C#. But learning the new programming language is only part of the challenge. The much greater challenge is learning the .NET Framework and all its capabilities.
The course starts with an introduction to the architecture and key concepts of .NET. It then discusses class libraries, assemblies, versioning, configuration, and deployment, which constitute a major advance in the simplicity and robustness of deploying Windows applications, ending the notorious “DLL hell.” The next four chapters discuss important topics in the .NET programming model, including metadata, reflection, I/O, and serialization. Chapter 6 continues the discussion of the .NET programming model, covering memory management, asynchronous programming and application domains. Next comes a chapter on threading, which includes an introduction to the Task Parallel Library (TPL).
.NET Security, which was simplified in .NET 4.0, is introduced, including both code access security and role-based security. The next chapter covers interoperability of .NET with COM and with Win32 applications. The course includes an introduction to database programming using ADO.NET and LINQ. Finally, the .NET Framework diagnostic facilities are discussed in depth. An appendix covers .NET Remoting.
The course is practical, with many examples and a case study. The goal is to equip you to begin building significant applications using the .NET Framework. The student will receive a comprehensive set of materials, including course notes and all the programming examples.
What You Will Learn
- Gain an understanding of the philosophy and architecture of WPF
- Create Windows applications using the classes provided by WPF
- Understand the principles of XAML and create applications using a combination of code and XAML
- Use the layout features of WPF to create flexible and attractive user interfaces
- Implement event and command-driven applications with windows, menus, dialogs, toolbars, and other common user interface features
- Use more advanced features of WPF such as dependency properties, routed events, logical resources, styles, templates, and data binding
- Access databases using Visual Studio 2017 and the Entity Framework 6
- Learn how to interoperate between WPF and Windows Forms
The student should have a good working knowledge of C# and the .NET Framework. Basic knowledge of ASP.NET and HTML is also required.
1. Introduction to ASP.NET MVC
Review of ASP.NET Web Forms
Advantages and Disadvantages of Web Forms
Advantages and Disadvantages of ASP.NET MVC
2. Getting Started with ASP.NET MVC
Installing ASP.NET MVC
Using Visual Studio
Hello World for ASP.NET MVC
Razor View Engine
3. ASP.NET MVC Architecture
The Controller in ASP.NET MVC
The View in ASP.NET MVC
The Model in ASP.NET MVC
Helper Methods for HTML
4. The Model
Microsoft Technologies for the Model
ADO.NET Entity Framework 6
NuGet Package Manager
5. The Controller
Controller Base Class
Retrieving Data from a Request
6. The View
Using Dynamic Objects
Routing in ASP.NET MVC
Properties of Routes
Parameters in Routing
8. Unit Testing
Visual Studio Unit Test Framework
Testing ASP.NET MVC Applications
Inversion of Control Containers
Cross-site Request Forgery
Using the MVC Framework Securely
10. Combining ASP.NET MVC and Web Forms
Using Web Forms in an MVC Application
Using MVC in a Web Forms Application
11. ASP.NET Web API
ASP.NET Web API
Representational State Transfer
REST and Web API
HTTP Services Using Web API
ASP.NET Web API Clients
12. ASP.NET and Azure
What Is Windows Azure?
A Windows Azure Testbed
Deploying an Application to Azure
Updating an Application on Azure
Appendix A. Learning Resources
Appendix B. Deployment in IIS 7.5
MVC with IIS 7.5
Required software is Visual Studio 2017, which includes LocalDB, a lightweight version of SQL Server 2016 Express. The free Visual Studio Community 2017 may be used. The operating system should be Windows 7SP1 or more recent. Several free tools are also used. These can all be downloaded from the Web. The last chapter requires a connection to the Internet, and a Windows Azure account (a free trial account is available from Microsoft). See the course Setup Notes for details.
A good minimal hardware profile for this course would have a 2 GHz or equivalent CPU, 4 GB of RAM, and at least 10 GB of free disk space for tools installation and courseware.