Develop the UX Flashcards
SEO, global and localization strategies
asp-action
tag helper that tells Razor what controller action we want to use on submit
asp-controller
tag helper to let our form know which controller to find the action in
ApplicationDbContext
provides the context to interface with the database and is referenced in the models
DbContext
Within ApplicationDbContext and teaches entity framework how the database will work
DbSet
a collection that represents an individual database table or view
private readonly ApplicationDbContext _context;
public AController(ApplicationDbContext Context)
allows for the same instance of the DbContext to be used instead of being created each time we request it
Inversion of Control
allows us to loosen the coupling of dependencies
_context.SaveChanges()
required to actually push the changes to the database (can do multiple then call)
startup.cs
configure the application and let it know what is is going to use
asp-for=”Name”
Tag helper - will populate the label with a field’s Name and also set the type, id, and name attributes on an input field
[Display(Name = “Name with Space”)]
Data Annotation - sets the display name which gets passed asp-for what you want the label to be
_ViewStart.cshtml
allows us to set code that applies when you return a view:
@{ Layout = “_Layout”; }
@ViewData
is a dictionary that allows us to pass data from our controller to our view
@RenderSection
acts as a placeholder to pass specific content into the page (can be set as required or optional)
@RenderBody
where all content not set to a specific section will be rendered