SQL Index
Help speed up searches/queries
CREATE INDEX = Duplicate; CREATE UNQIUE INDEX = Unique
o CREATE INDEX idx_name
o ON DB (Col, Col, Col);
Primary vs Foreign Key
Primary Key – unique identifier for each record
Foreign key – used to reference the primary key of a record in a
different table
o Users Table: UserID and Name
o Posts Table: Post ID, AuthorID, Content
Allows for lookup of data from one table without needing to duplicate
that data in another
Entity Framework
Maps objects in software to tables/columns in database
Encapsulation
Combinibng data and functions into classes
Abstractions
Showing only relevant data and hide details from user
Public, Private
IEnumerable
Exposes enumerator, which supports interaction over a non-generic
collection
var letters = [Link]('a', 26). Select(n => (char)n);
o static void Main()
o {
o foreach (string fruit in GetFruits())
o {
o [Link](fruit);
o }
o }
o
o // This method returns an IEnumerable<string>
o static IEnumerable<string> GetFruits()
o {
o yield return "Apple";
o yield return "Banana";
o yield return "Orange";
o }
useState
Import it
const [age, setAge] = useState(28);
function handleClick() {
o setAge(29);
}
Pass an updated function to update state (as age is not updated when
code already running)
o setAge(a => a + 1);
Component gets new props
Generally triggers a re-render
Hooks could cause a re-render
Blazor Component
Components/[Link]
o Add content
[Link] (<[Link] />
/_imports.razor (@using [Link])
In [Link]
@page “/”
<Name />
Blazor ReRender
Event or updating parameters from a parent component