ASP.NET Core MVC
ASP.NET Core vs .NET Core
.NET Core: a runtime, which can execute applications built for it. Applications built in .NET Core have the advantage of being cross platform. How is it different from ASP.NET? -Built in dependency injection? (later flashcard) -Ability to host on a variety of servers (IIS, Nginx, Apache, Docker, or self host) -helper tags in razor pages (asp-action), etc.. ASP.NET Core: A framework for developing .NET Core applications- a collection of libraries for building web apps. ASP.NET Core libraries can be used on .NET Core and the the "Full .NET Framework" https://stackoverflow.com/questions/44136118/net-core-vs-asp-net-core
ASP.NET Core tag helpers
ASP.NET Core comes with tag helpers which simplify form communications from the view to the controller. https://docs.microsoft.com/en-us/aspnet/core/mvc/views/working-with-forms?view=aspnetcore-2.2 Policies are added in configureservices in startup.cs Docs: https://docs.microsoft.com/en-us/aspnet/core/security/authorization/policies?view=aspnetcore-2.2
Entity Framework EF Core Powertools EF Designer
Entity Framework is an Object Relational Mapper (ORM) which is a type of tool that simplifies mapping between objects in your software to the tables and columns of a relational database EF Core Powertools: This extension is specific to ASP.NET Core projects. It is an extension that simplifies the data-first approach to programming. It will allow you to easily map tables in your database to C# objects. In ASP.NET projects, EF Designer (which is built into visual studio) was used to map database tables to c# objects. https://docs.microsoft.com/en-us/ef/ef6/modeling/designer/workflows/database-first
Validation, (with and without having the page refresh) Validation Attributes
Validation attributes Let you specify validation rules for model properties. Most of these require the page to be refreshed so that the data can be sent back to the server for validation checks. Then, the errors are shown in the view. https://docs.microsoft.com/en-us/dotnet/api/system.componentmodel.dataannotations.metadatatypeattribute?view=netframework-4.8&viewFallbackFrom=netcore-2.2 You can make custom validation attributes to suit your needs.
preprocessor directive
a program line beginning with # that provides an instruction to the preprocessor. ex: #if debug { } ... etc. we talked about this in sprin 2019 when peyton had to make a transforming web config for the web application of rotc.
Model metdata
add validation to the creation of models https://docs.microsoft.com/en-us/dotnet/api/system.componentmodel.dataannotations.metadatatypeattribute?view=netframework-4.8&viewFallbackFrom=netcore-2.2 This validation attribute would be used in model metadata class
objects with I such as IEnumerable,IActionResult, etc..
an interface that gives a way to write a loop that goes through its contents in order. The capital "i" infront of the object name specifies that it is an interface. Returning an interface from a method has the advantage that you can return any object that inherits from that interface. When you are utilizing the object that is returned from that method, you know that it will have all the behavior that is defined in the interface contract.
areas
https://docs.microsoft.com/en-us/aspnet/core/mvc/controllers/areas?view=aspnetcore-2.2
routing to actions in asp.net core - disambiguating etc.
https://docs.microsoft.com/en-us/aspnet/core/mvc/controllers/routing?view=aspnetcore-2.2 -has explanations of disambiguating actions using http validation attributes such as: [HttpGet] . and other cool stuff. this was what i used to fix a bug when i was trying to show madison how the ajax call passes data to the controller.
Render tags, ex. RenderBody( )and RenderSection() tags
https://exceptionnotfound.net/asp-net-mvc-demystified-layout-viewstart-renderbody-and-rendersection/
Viewbag
https://stackify.com/viewbag/ a property of controller and views. It can be used to pass data from controller to the view. Useful b/c you can change those values dynamically in the controller depending on certain user input
_ViewStart.cshtml
https://www.tutorialspoint.com/asp.net_core/asp.net_core_razor_view_start.htm
IoC (Inversion of Control) DIP (Dependency Inversion Principle) DI (Dependency Injection)
https://www.tutorialsteacher.com/ioc