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 



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 ev...