Articles tagged #C#
7 article(s)
-
Run MongoDB in Docker and Connect from .NET
MongoDB 7 in a container with one command, then typed documents, filters, atomic updates, LINQ, and indexes from the .NET driver — verified end to end.
@llaxmikant · May 26, 2026 -
How to Export SQL Server Data to Excel in C# (Without Office Interop)
Export SQL Server query results to Excel with ClosedXML — no Office installation, no COM Interop, safe on servers and containers, with styling and a Web API download endpoint.
@llaxmikant · Mar 21, 2026 -
How to Setup CORS Policies in ASP.NET Core Web API
Configure CORS in ASP.NET Core Web API — default and named policies, origin/method/header restrictions, preflight requests, per-endpoint policies with RequireCors, and EnableCors/DisableCors attribute
@llaxmikant · Mar 2, 2026 -
Bulk Upload into SQL Server using SqlBulkCopy and C#
Load 100,000 rows in under a second with SqlBulkCopy: column mappings, batch sizes, transactions, staging tables, and the constraint fine print — measured for real.
@llaxmikant · Feb 28, 2026 -
Compare DataTables with LINQ: Except, Intersect and Union
Diff two data snapshots with LINQ set operators: what was added, removed, changed, and unchanged — including the modern ExceptBy/IntersectBy/UnionBy variants.
@llaxmikant · Jan 1, 2026 -
IDisposable, Finalizers and the Dispose Pattern in .NET
Deterministic cleanup with using, the full dispose pattern explained line by line, IAsyncDisposable, SafeHandle, and why you almost never write a finalizer.
@llaxmikant · Dec 20, 2025 -
Convert a DataTable to CSV, List or JSON in .NET
Three DataTable conversions done right in .NET 10: RFC-4180 CSV with quoting, typed List<T> via DataRow.Field, and JSON through records — edge cases verified.
@llaxmikant · Nov 19, 2025