Demonstrates EF Core's complex type feature via a shared ContactInfo record (PhoneNumber, Email) reused across Customer, Employee, and Vendor entities, showing how EF Core flattens it into ContactInfo_PhoneNumber/ContactInfo_Email columns per table, then wiring it up with the Owned annotation. ...
Compares C# type declarations with side-by-side examples: a mutable Student class where s2 = s1 shares one reference so changing s2.Semester also changes s1.Semester, a Point struct where copies behave as independent value types, and C# 9.0's immutable records with built-in equality and hashing. ...
Builds a reusable GradientButton control in .NET MAUI step by step: scaffolding a ContentView in a controls folder under MVVM, swapping its default Label for a named Button, then exposing a bindable Text property via BindableProperty.Create so it binds from XAML like any built-in control. ...
Introduces BenchmarkDotNet for .NET performance testing: marking a SumNumbers method with [Benchmark], running it via BenchmarkRunner.Run in Release configuration, understanding its warmup and pilot-run process for JIT-optimized results, and parameterizing input sizes with [Params(10, 100, 1000)]. ...
Compares four ways to bulk insert an Order entity in EF Core: naive per-record Add plus SaveChangesAsync, DbSet.AddRangeAsync, the EFCore.BulkExtensions package's BulkInsertAsync for true batched inserts, and raw SQL, weighing each against change-tracker overhead and round-trip cost at scale. ...
Covers C# 13 on .NET 9: extending params beyond arrays to Span<T>, stack-allocated ReadOnlySpan<T>, and IEnumerable<T> collections, plus the new implicit index operator, a dedicated escape sequence, the System.Threading.Lock type, and optimized overload resolution, each with runnable code. ...
Implements Quartz.NET scheduling two ways: a console PrintJob firing every 5 seconds via IJob, StdSchedulerFactory, and WithSimpleSchedule().RepeatForever(), then an ASP.NET Core alarm job configured through appsettings.json using the Cron expression 0 0 7 * * ? to run automatically at 7 AM daily. ...
Contrasts C# 9.0 records against classes using a Student(Name, Age) example: records give value-based equality, so two identical Students compare equal, versus classes' reference equality, plus the with expression for non-destructive copies, then argues for records as concise, immutable API DTOs. ...
Walks through .NET 9's JsonSchemaExporter in System.Text.Json: calling GetJsonSchemaAsNode on a Student record to produce a JSON Schema document, then customizing output via JsonSerializerOptions with SnakeCaseLower naming, NumberHandling.WriteAsString, and JsonUnmappedMemberHandling.Disallow. ...