Tuesday, 25 November 2025

design

 


Create local ts file for enviornment latest angular 20

create environment.local.ts

and environment.ts files
in package.json give ng s

"start": "ng  s --configuration local",

    "configurations": {

            "production": {
              "fileReplacements": [
                {
                  "replace": "src/environments/environment.ts",
                  "with": "src/environments/environment.prod.ts"
                }
              ],
              "budgets": [
                {
                  "type": "initial",
                  "maximumWarning": "2MB",
                  "maximumError": "2.5MB"
                },
                {
                  "type": "anyComponentStyle",
                  "maximumWarning": "6kB",
                  "maximumError": "10kB"
                }
              ],
              "outputHashing": "all"
            },
            "development": {
              "fileReplacements": [
                {
                  "replace": "src/environments/environment.ts",
                  "with": "src/environments/environment.dev.ts"
                }
              ],
              "optimization": false,
              "extractLicenses": false,
              "sourceMap": true
            },
            "test": {
              "fileReplacements": [
                {
                  "replace": "src/environments/environment.ts",
                  "with": "src/environments/environment.test.ts"
                }
              ],
              "sourceMap": true,
              "optimization": false
            },
            "local": {
              "fileReplacements": [
                {
                  "replace": "src/environments/environment.ts",
                  "with": "src/environments/environment.local.ts"
                }
              ],
              "sourceMap": true,
              "optimization": false
            }
          },
          "defaultConfiguration": "local"
        },
        "serve": {
          "builder": "@angular/build:dev-server",
          "configurations": {
            "production": {
              "buildTarget": "EnviriUARUI:build:production"
            },
            "development": {
              "buildTarget": "EnviriUARUI:build:development"
            },
            "test": {
              "buildTarget": "EnviriUARUI:build:test"
            },
             "local": {
              "buildTarget": "EnviriUARUI:build:local"
            }
          },
          "defaultConfiguration": "local"
        }

Wednesday, 19 November 2025

EFcore best practice

 

🌉 What is a Navigation Property?

Think of navigation properties as shortcuts or links between two related tables in Entity Framework.

It’s like saying:

“Hey EF… this row belongs to that row — help me jump between them automatically.”


📌 Real-world example (your case)

You have:

1. TblUarRecord (Parent table)

Each UAR record can have many ReviewActions.

2. TblReviewAction (Child table)

Each ReviewAction belongs to one UAR record.

This is a one-to-many relationship.


🔗 So navigation properties help you do things like:

Instead of writing SQL manually:

SELECT * FROM tbl_ReviewAction WHERE UARRecordId = 1

You can simply do:

var actions = uarRecord.ReviewActions;

Or:

var uar = reviewAction.UarRecord;

That's the beauty of navigation properties — EF handles relationships for you.


🧩 How these properties look in your models

Parent Model (TblUarRecord)

public class TblUarRecord { public int UARRecordId { get; set; } // Navigation → One record has many review actions public ICollection<TblReviewAction> ReviewActions { get; set; } }

Child Model (TblReviewAction)

public class TblReviewAction { public int ReviewActionId { get; set; } public int UARRecordId { get; set; } // Navigation → This action belongs to one UAR record public TblUarRecord UarRecord { get; set; } }

🤯 Why this is useful?

1. Auto-joins

EF Core automatically joins tables when needed.

2. You can load related data easily

var record = await _context.TblUarRecord .Include(r => r.ReviewActions) .FirstAsync(r => r.UARRecordId == 1);

3. Cascade operations

Delete a UARRecord → EF can delete its actions automatically (if enabled).

4. Cleaner code

You work with objects, not SQL.


🎯 Quick Summary

Navigation Property = shortcut to related table

  • Helps EF understand relationships

  • Enables .Include(), lazy loading, etc.

  • You can access related data easily

  • Useful in parent–child tables (like yours)


If you want, I can update your full models with proper navigation properties + foreign key attributes.

AI tools

 CoDE AI
https://www.qodo.ai/blog/best-ai-coding-assistant-tools/#4-bolt


junior devops engnr

  Position Overview: We are a growing start up seeking a Junior Azure DevOps Engineer with 2 to 3 years of experience to support our Azure...