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


Tuesday, 11 November 2025

Prompt

 

I need a detailed technical specification and architecture plan for an application with two main modules:

  1. Uploader
  2. Manager/Reviewer.

Functional Overview:

  • The uploader module allows users to upload Excel sheets. Each new upload may have a different header structure.
  • The system should dynamically read and map the headers during upload.
  • The manager/reviewer module allows reviewers to view uploaded records, review them, and comment on each record individually.
  • After review, the uploader should see a dashboard displaying the list of records categorized by status: Pending, Removed, and Redirected.
  • Each reviewer should only see records assigned to their name.

Technology Stack:

  • Backend: ASP.NET Core
  • Frontend: Angular
  • Database: SQL Server
  • Storage: Azure Blob Storage for uploaded files
  • Analytics: Linkable to Power BI

Key Requirements:

  1. Implement a complete audit trail tracking all record-level changes (who changed what and when).
  2. Enable smooth integration with Power BI for reporting and analytics.
  3. Efficiently manage dynamic column mapping when headers differ across uploads.
  4. Design scalable and secure APIs between Angular frontend and ASP.NET Core backend.
  5. Use best practices for Azure Blob integration, including file metadata for version tracking.

Expected Output:

  • Proposed database schema supporting dynamic headers and audit tracking.
  • API endpoint definitions for uploader and reviewer operations.
  • Recommended Angular component structure for dashboards and file review.
  • Suggested table relationships and Power BI connection strategy.
  • Security and performance considerations for multi-user roles (uploader/reviewer/admin).

Generate this as a system design outline with diagrams, workflow steps, and recommended patterns (like repository pattern or CQRS if applicable).

AI List

 https://www.aixploria.com/en/categories-ai/

Sunday, 9 November 2025

calling or handling data without c# model

 calling or handling data without c# model

Yes, it is possible to read data in a C# Web API without explicitly defining model classes for every piece of data. While using strongly-typed model classes is generally recommended for maintainability, type safety, and better IntelliSense, there are scenarios and methods for handling data without them.
Here are some approaches: Using [FromBody] JObject or dynamic.
You can use JObject from the Newtonsoft.Json library (or JsonElement from System.Text.Json in .NET Core) or the dynamic keyword to handle incoming JSON data without a predefined class. This allows you to access properties dynamically, similar to how you might work with JavaScript objects.
    using Newtonsoft.Json.Linq; // For JObject

    [HttpPost]
    public IActionResult PostDynamicData([FromBody] JObject data)
    {
        string name = data["name"]?.ToString();
        int age = data["age"]?.ToObject<int>() ?? 0;
        // ... process data
        return Ok($"Name: {name}, Age: {age}");
    }


    [HttpPost]
    public IActionResult PostSingleValue([FromBody] int id)
    {
        // ... process id
        return Ok($"Received ID: {id}");
    }

Friday, 7 November 2025

Arcemetal

 Arcemetal interview questions

1.write the factorial code

2.write sql query to gets sales order over last 3 days

3.angular:dashboard > page A >page B > page c

send login data dashboard to page c
4.migrating issues

5.di in your project


Tuesday, 4 November 2025

rownumber over by

 select *,

ROW_NUMBER() Over (PARTITION  by ColumnType order by ColumnType desc ) as rn

from [NH].[tbl_NewHire_LookupValues]  where countryCode='AE'

i have duplicate dropdown values entered remove it from the list 

by using above code not getting row number properly 



Capgemini Interview

 capgemini famous interview question List<int> A = new List<int>(); A.add(1); List<int> B=A; B=new List<int>(); B.Ad...