Code Adventure

Code Adventure

Share

Every adventure begins with a quest, perhaps a desire to build a game, develop a website, or automate a tedious task.

06/06/2026

šŸ“§ ASP.NET Core Email Template Model | Entity Framework Database Mapping
Email Template model in ASP.NET Core using Entity Framework Core. In this tutorial, we define the EmailTemplate class with properties such as Id, Subject, Description, and Type, and map it to the database using the [Table] attribute.

āœ… Create EmailTemplate model
āœ… Use Data Annotations for table mapping
āœ… Define properties and enums
āœ… Entity Framework Core integration
āœ… Clean and scalable code structure
Follow me for more videos and codes: Code Adventure

06/06/2026

Example for removing a property from json.
Follow me for more videos and codes: Code Adventure

06/06/2026

Interface helpers
Follow me for more videos and codes: Code Adventure

06/04/2026

ASP.NET Core Entity Framework Invoice Detail Model | Database Relationships Explained
I demonstrate how to create an InvoiceDetail model in ASP.NET Core using Entity Framework Core. Learn how to define primary keys, foreign keys, navigation properties, and establish relationships between Invoice, Product, and InvoiceDetail tables.

āœ… Creating the InvoiceDetail entity
āœ… Using [Key] and [ForeignKey] attributes
āœ… Setting up Product and Invoice relationships
āœ… Working with Entity Framework Core Code First
āœ… Database table mapping with Data Annotations
āœ… ASP.NET Core MVC & Web API Development
Follow me for more videos and codes: Code Adventure

06/04/2026

A retry should not charge a customer twice.

Or send the same email twice.

Or create the same record twice.

But this is exactly what can happen in a message-based system.

Messages can be sent more than once.

Your service can crash after the work is done, but before it says, "I’m finished".

The broker may then send the same message again.

So your consumer needs to be safe to run more than once.

A simple rule helps:

→ Give each message an ID
→ Keep track of messages you already handled
→ Save that record with the work itself
→ Skip the work when the same message comes back

This is the Idempotent Consumer pattern.

You do not need it for every handler.

But when a duplicate could change data, send something twice, or trigger a payment twice, it matters a lot.

I wrote a practical guide to building idempotent consumers in .NET, including where the pattern helps and where it adds needless work.
Follow me for more videos and codes: Code Adventure

06/04/2026

Some LINQ queries are much harder to read than the SQL they create.

Left joins are a great example.

You want a simple result:

→ Show all products
→ Include reviews when they exist
→ Keep products with no reviews

But in EF Core, writing that query used to take several steps.

It worked.

It was also easy to get wrong, hard to scan, and not fun to explain to the next person reading your code.

EF Core 10 fixes this with new LeftJoin and RightJoin operators.

Now your query can say what it is actually doing.

Why this matters:

→ Less noise in common queries
→ Clearer intent for your team
→ Fewer workarounds
→ The same SQL result underneath

This is useful for more than products and reviews.

Think:

→ Users with optional settings
→ Orders with optional shipping data
→ Customers with optional invoices

Anywhere related data may be missing, a clean join makes the code easier to trust.

I wrote a practical guide to the new join operators in EF Core 10, including how they compare to the old approach and when to use each one.
Follow me for more videos and codes: Code Adventure

06/03/2026

Profile dropdown using , and šŸ§‘ā€šŸ’»

Code on the link in the comments free for next 24h then available in Atheros Pass šŸš€
Follow me for more videos and codes: Code Adventure

06/03/2026

Nice set of SVGs
Follow me for more videos and codes: Code Adventure

06/03/2026

BaseEntity & AuditEntity Base Classes (C # / DancerMuse.Api.Models)
Two base classes defined in the DancerMuse.Api.Models namespace:
BaseEntity — The common parent class for all entities. Tracks full audit timestamps (CreatedDate, UpdatedDate, DeletedDate), user references (CreatedBy, UpdatedBy, DeletedBy), and soft-delete flags (IsDeleted, IsActive, both defaulting to false). Note: no Id property here, which explains the redundancy seen in the Notification entity earlier.
Follow me for more videos and codes: Code Adventure

06/02/2026

Notification Entity Model (C # / EF Core)
C # entity class mapped to a Notification database table, inheriting from BaseEntity. It defines five properties: Id (primary key), Subject (max 255 chars), Message (max 500 chars), DeviceToken (max 255 chars, likely for push notifications), and Status (defaults to NotificationStatus.Pending), plus a UserId foreign key linking the notification to a user.
Follow me for more videos and codes: Code Adventure

Want your school to be the top-listed School/college in Washington D.C.?
Click here to claim your Sponsored Listing.

Category

Telephone

Address


Washington D.C., DC
20001