Magnus Mårtensson
Microsoft Regional Director, Azure MVP, CEO Loftysoft
Avirag Jain
Director & CTO R Systems
Mahesh Chand
Founder C# Corner, CEO Mindcracker
Chris Gali
CEO & Co-Founder Graphite
Subinder Khurana
Chief Architect StoryProcess, Founder NASSCOM DeepTech Club
Bryan Rishforth
Investor, Chairman Graphite
Bryn Everson
Director Biz Dev Graphite
Raj Tiwari
Digital Transformation Leader, Futurist and Visionary
Joseph Guadagno
Microsoft MVP, Lead Quicken Loans
Nikita Sachdev
Entrepreneur, Blockchain Enthusiast & Advisor, Social Media Influencer
Doug Wagner
COO & Founder Adapt Technical Group
Ritesh Modi
Architect, Senior Evangelist, Cloud Architect
Crystal Wenrick
Director Communications Mindcracker
Allen O’Neill
Microsoft MVP, Consulting Engineer/Architect
Praveen Kumar
CEO MCN Solutions
Chris Love
Founder Love2Dev, Microsoft MVP, Author
Sanjay Vyas
Microsoft Regional Director, Microsoft MVP, Founder & CEO SkillLabs Technologies
Veena Sarda
Deep Learning Consultant, Author
Sekhar Srinivasan
C# Corner MVP, Microsoft Certified Trainer, Pluralsight Author
Lalit Bansal
Founder & CEO - EIY SYS
Navdeep Garg
CEO Revinfotech
Prakash Tripathi
Tech Manager/Leader, Microsoft MVP, Blogger
Bhavna Jain
Breakthrough Consultant
Naveen Sharma
Enterprise Architect, Leadership Coach, Author
Vidya Vrat Agarwal
Principal Architect, Microsoft MVP, Author
Sheetal Agarwal
Founder Clownselors, Medical Clown, Trainer
Abhishek Kant
Founder GTM Catalyst
Vishnu Saran
Founder & CEO VoiceQube
Sandeep Soni
Founder & CEO Deccansoft, Microsoft Certified Trainer
Parveen Malik
AVP InfoSec & Vulnerability Management, Information Security Expert
Nitin Pandit
Microsoft MVP, Developer Evangelist, Author
Niloshima Srivastava
C# Corner MVP, Tech Architect, Trainer, Blogger
Bala Chirtsabesan
Senior Software Engineer at Microsoft, Author
Manoj Mittal
Sr. Technical Architect, C# Corner MVP, Author
Chandni Di
Co-Founder Voice of Slum
Vithal Wadje
Technical Lead, Microsoft MVP, Author
Shivam Ahuja
Founder SkillCircle, Business Mentor
Chervine Bhiwoo
Solution Architect, Microsoft MVP, Author
Saurabh Jain
Vice President Paytm, Founder Fun2Do Labs, Author
Vinay Solanki
Head IoT at Lenovo, Founder IoT-NCR
Anshu kumari
Founder Blockchainkids, Inventor, Trainer
Amit Singal
CEO Startup Buddy
Dev Pratap
Co-Founder & CEO Voice of Slum
Amey Vartak
Technology Consultant, Full Stack Developer, C# Corner MVP, Author
Viswanatha Swamy
Principal Software Engineer, C# Corner MVP, Author
Sanket Verma
Research Engineer @ Ballistics (Forensics) and Chair, PyData Delhi
Sourabh Somani
Lead Developer, Microsoft MVP, Author
Abhishek Mishra
Software Architect, C# Corner MVP, Author
Siddharth Vaghasia
Technical Consultant, C# Corner MVP, Blogger
Bassam Alugili
Senior Software Specialist, Database Expert
S Ravi Kumar
Solution Architect, C# Corner MVP, Author
Sundaram Subramanian
Full Stack Developer, C# Corner MVP, Speaker
Deepesh Somani
Solution Architect, Microsoft MVP, Author
Debasis Saha
Technical Project Manager, C# Corner MVP, Blogger, Author
Vipul Jain
Software Architect, C# Corner MVP, Author
Akshay Patel
Technical Architect, Microsoft Certified Trainer, C# Corner MVP, Author
Stephen Simon
RPA Developer, Evangelist, Author
Vivek Sharma
Founder Kingster636, AR/VR Specialist
Jeetendra Gund
Technical Lead, C# Corner MVP, Author
Sujal Beniwal
AI Enthusiast, Student
M Viknaraj
Microsoft MVP, Azure Architect, Author
Prasham Sabadra
Software Architect, C# Corner MVP, Trainer, Author
Aakash Maurya
Senior Developer, C# Corner MVP, Speaker
Ankit Sharma
Senior Software Engineer, C# Corner MVP, Author
Mangesh Gaherwar
Team Lead, C# Corner MVP, Author
Viral Jain
Technical Consultant, C# Corner MVP, Author
Bhasker Das
Solution Architect, Evangelist
Manish Dwivedi
Associate Project Manager
Ck Nitin
Programmer, Author
Rohit Gupta
Technical Trainer, Author
Manish Tewatia
Full-stack Marketer, UX Designer
Bhavya Gaur
Technical Illustrator
Rohit Tomar
SEO/SMO Expert
Web Track
Cloud & Data Track
Dev Track
Registration & Breakfast
Future of Desktop Apps with JS (ElectronJs)
Nitin Pandit
Building Serverless Microservices Using Microsoft Azure
Vithal Wadje
Innovating RPA: A Robot for Every Person
Stephen Simon
Managing Cloud Storage Accounts using Logic Apps
Viknaraj Manogararajah
Data visualization using Python
Sekhar Srinivasan
Going Cross platform with AR Foundation
Vivek Sharma
Keynote
Managing your Azure dependencies in ASP.NET Core apps using VS
Bala Chirtsabesan
Securing Applications on Intelligent Azure
Abhishek Mishra
Getting started with Blazor the Framework of Future
S Ravi Kumar
Lunch
Build Progressive Web Apps using Angular 9
Debasis Saha
Build and deploy to any platform using Azure DevOps
Chervine Bhiwoo
Deep Dive in Azure Service Bus
Akshay Patel
Build a Native Mobile Application using React Native and JavaScript
Joseph Guadagno
Making sense of Web Job, Web Job SDK and Functions in Azure
Prakash Tripathi
CloudFront Distribution in AWS
Viral Jain
Tea Break
Introduction to PowerBI
Aakash Maurya
Build Advanced SPFx solutions with React and Graph API
Siddharth Vaghasia
Build Business Intelligence Analyst (BIA) Skills
Sundaram Subramanian
Deep dive of Power Platform – AI BUILDER
Prasham Sabadra
Panel 1
What's new in SharePoint development
Vipul Jain
Build a SSO (Single Sign On) based Native JavaScript application with Microsoft Identity within 10 minutes
Manoj Mittal
Panel 2
Applications and working of AI
Veena Sarda
Deploying serverless API's with .Net core 3.0 on AWS & Azure
Amey Vartak
Panel 3
Blockchain with .NET Core (Ark)
Anshu Kumari
Closing Note & Prize Distribution
Dev Track
Cloud Track
Architecture Track
Emerging Tech Track
Registration & Breakfast
Creating Full-Stack Web Apps Using Server-Side Blazor
Ankit Sharma
Real time face recognition with MS Cognitive Services
Niloshima Srivastava
Building Scalable APIs with GraphQL
Jeetendra Gund
Future of development with AI and Blockchain
Navdeep Garg
Debugging Tips and Tricks with Visual Studio 2019
Joseph Guadagno
Azure Containers
Abhishek Kant
Enterprise Architecture
Naveen Sharma
Bot Framework - learn it fast and look like a boss!
Allen O’Neill
Keynote
.Net Core & C# 8 Performance
David McCarter
Working with Azure kubernetes services
Ritesh Modi
Becoming an Architect
Vidyavrat Agarwal
Why Techies Need to Learn Product Management
Saurabh Jain
Lunch
Build a rules engine in .Net Core
Sanjay Vyas
Building CI and CD Pipeline using Azure DevOps
Sandeep Soni
Entity Framework Core - Tips and Tricks, Performance Optimization, and Tuning
Bassam Alugili
Hacking your way into Data Science
Sanket Verma
Speed up your .Net Core Website
Sourabh Somani
Azure
Magnus Mårtensson
Demystifying Open Distro for Elasticsearch
Suman Debnath
Future of Data
Shivam Ahuja
Tea Break
gRPC with C# and .Net Core
Mangesh Gaherwar
Panel 1
Essentials of Cloud security
Parveen Malik
Power platform and Dynamics 365
Deepesh Somani
Microservices - the gRPC Way
Viswanatha Swamy
Panel 2
Reserved
Reserved
Closing Note & Prize Distribution
Build a simple ORM with reflection and Dapper-like execution
A compact persistence layer is useful when a .NET application needs less ceremony than a full object relational mapper but more consistency than raw ADO.NET. Australian teams in Sydney, Melbourne and Brisbane often maintain mixed .NET estates, so a small mapper must coexist with established SQL Server databases, Azure-hosted services and older service APIs rather than assume a greenfield platform.
The core mechanism combines runtime member inspection with lightweight command execution. Reflection discovers entity properties and turns them into command parameters; a materialiser reads result-set columns into new objects. Commands remain visible, parameters stay bound to values, and every query returns plain C# objects without lazy loading or change tracking.
The scope is deliberately narrow: one entity per row, explicit SQL, and SQL Server through Microsoft.Data.SqlClient. That makes the design suitable for prototypes, internal tools and focused services, but it does not try to replace migrations, identity maps, unit-of-work patterns or database-specific optimisers. A separate repository can provide those larger concerns when a product needs them.
Security begins with treating the mapper as a convenience, not a permission to concatenate input. Property names and schema identifiers describe structure, while customer-supplied values belong in parameters. For teams handling Australian records, the Privacy Act 1988 and relevant state privacy duties also favour data minimisation, restrained logging and clear retention decisions.
Choose a deliberately small feature set
Before writing reflection code, define what the mapper must do and, more importantly, what it must leave alone. The following comparison shows where it sits between familiar options.
| Concern | Raw ADO.NET | Dapper | Small reflection mapper |
|---|---|---|---|
| Row mapping | Written by hand | Automatic | Automatic |
| SQL control | Full | Full | Full |
| Change tracking | None | None | None |
| Lazy loading | None | None | None |
| Dependencies | ADO.NET provider | Dapper | ADO.NET provider |
| Best fit | Isolated queries | General micro-ORM | Learning or constrained services |
A Dapper-like API can expose QueryAsync<T> and ExecuteAsync as connection extensions. That keeps call sites compact while leaving command text nearby. This implementation uses exact property-to-column matching, supports common scalar and nullable types, and assumes entities have a parameterless constructor. It does not support composite keys, inherited schemas or automatic entity-to-schema naming.
The trade-off is important: every additional convenience expands the surface area that must be tested. A mapper that quietly changes SELECT clauses, inserts unrelated columns or caches stale metadata becomes difficult to reason about. Keeping SQL explicit gives consultancy and engineering teams a predictable layer they can inspect during reviews or hand to another developer.
Define entities with stable conventions
Start with an ordinary class. There is no need for a base entity, an interface or a proxy factory. A schema attribute controls the SQL identifier, while public readable properties supply values and public writable properties receive mapped results.
using System;
[Table("dbo.Customers")]
public sealed class Customer
{
[Identity]
public int Id { get; set; }
public string Name { get; set; } = "";
public string? Email { get; set; }
public DateTime CreatedAt { get; set; }
}
[AttributeUsage(AttributeTargets.Class)]
public sealed class TableAttribute : Attribute
{
public TableAttribute(string name) => Name = name;
public string Name { get; }
}
[AttributeUsage(AttributeTargets.Property)]
public sealed class IdentityAttribute : Attribute
{
}
The property and column names match exactly in this first version: Name maps to Name, and CreatedAt maps to CreatedAt. This avoids guessing about pluralisation or converting CustomerNumber into customer_number. If a legacy schema differs, a small column attribute or a metadata dictionary can provide the mapping without scattering conditionals through the mapper.
Readable and writable properties are not identical sets. Here, the Identity attribute marks a database-generated key. Such a column may be absent from an INSERT, while a computed property may be read-only but still returned by a SELECT. Separating insertable properties from result properties prevents a reflective INSERT from attempting to write a value the database will reject.
Turn properties into safe commands
Start by describing how metadata should be scanned: public instance properties marked for insertion become columns and parameter names. Use typeof(T).GetCustomAttribute<TableAttribute>() to obtain the schema identifier, and fail fast when it is missing rather than guessing from the class name. The snippets read metadata directly for clarity; a production implementation can cache it by Type.
using System;
using System.Linq;
using System.Reflection;
public static class SqlBuilder
{
public static string Insert<T>()
{
var type = typeof(T);
var table = type.GetCustomAttribute<TableAttribute>()
?? throw new InvalidOperationException(
"A table attribute is required.");
var properties = type.GetProperties(
BindingFlags.Public | BindingFlags.Instance)
.Where(p => p.CanRead && p.CanWrite
&& p.GetCustomAttribute<IdentityAttribute>() == null)
.ToArray();
if (properties.Length == 0)
throw new InvalidOperationException(
"No insertable properties were found.");
var columns = string.Join(", ", properties.Select(p => p.Name));
var parameters = string.Join(", ",
properties.Select(p => "@" + p.Name));
return $"INSERT INTO {table.Name} ({columns}) VALUES ({parameters})";
}
}
The schema identifier comes from code, and the column names come from reflected members, not request data. Even so, reflection does not make arbitrary identifiers safe. The attribute should be treated as a whitelist: reject unexpected identifiers, and never build a statement by inserting a route value, form field or search term into command text.
The generated placeholders are parameter markers, not values. The execution step supplies one SqlParameter for each included property, using the same metadata list that produced the statement. That alignment avoids the common bug where SQL contains @Email but the command has no matching parameter. For an insert, pair SqlBuilder.Insert<Customer>() with new { customer.Name, customer.Email, customer.CreatedAt } so the values match its placeholders.
Materialise rows from result sets
Reading rows is the reverse operation. The mapper asks the data reader for each column index, locates the matching property by name, coerces the value to the property type and assigns it to a newly constructed entity. The snippets assume the relevant System, reflection and Microsoft.Data.SqlClient namespaces are imported.
public static class ReflectionMapper
{
public static T FromReader<T>(SqlDataReader reader)
{
var type = typeof(T);
var instance = Activator.CreateInstance<T>()!;
var columns = Enumerable.Range(0, reader.FieldCount)
.ToDictionary(reader.GetName, i => i);
foreach (var property in type.GetProperties(
BindingFlags.Public | BindingFlags.Instance))
{
if (!property.CanWrite ||
!columns.TryGetValue(property.Name, out var index))
continue;
if (reader.IsDBNull(index))
{
if (!property.PropertyType.IsValueType ||
Nullable.GetUnderlyingType(property.PropertyType) != null)
property.SetValue(instance, null);
continue;
}
var target = Nullable.GetUnderlyingType(property.PropertyType)
?? property.PropertyType;
var value = reader.GetValue(index);
object converted;
if (target.IsEnum)
converted = Enum.ToObject(target, value);
else if (target == typeof(Guid))
converted = (Guid)value;
else if (target == typeof(byte[]))
converted = value;
else
converted = Convert.ChangeType(value, target,
CultureInfo.InvariantCulture);
property.SetValue(instance, converted);
}
return instance;
}
}
This version supports common SQL Server scalars, nullable variants, integer-backed enums, GUIDs and binary values. Restricting supported types is clearer than returning a surprising conversion at runtime. Null handling also needs a deliberate policy: for a nullable string, a database NULL can be assigned directly; for a non-nullable value type, this implementation leaves the default value rather than forcing a zero that might look like genuine data.
Property setters may also validate values, so construction should occur through the normal public setter path. Exact column-name matching keeps the first version predictable, but a production mapper will often need a per-property override for a legacy schema. That override belongs in metadata, where it can be reviewed and tested, rather than hidden inside a conditional that runs for every row.
Expose Dapper-like async extensions
With mapping separated from execution, the public API can remain small. One extension adds bound parameters and executes a command; another reads rows and materialises each result. Both accept a cancellation token and return tasks that callers can await. Using the same imports, the core extensions can look like this.
public static class SqlExtensions
{
public static async Task<int> ExecuteAsync(
this SqlConnection connection, string sql,
object? parameters = null,
SqlTransaction? transaction = null,
CancellationToken ct = default)
{
using var command = connection.CreateCommand();
command.CommandText = sql;
command.Transaction = transaction;
AddParameters(command, parameters);
return await command.ExecuteNonQueryAsync(ct)
.ConfigureAwait(false);
}
public static async Task<IReadOnlyList<T>> QueryAsync<T>(
this SqlConnection connection, string sql,
object? parameters = null,
SqlTransaction? transaction = null,
CancellationToken ct = default)
{
using var command = connection.CreateCommand();
command.CommandText = sql;
command.Transaction = transaction;
AddParameters(command, parameters);
using var reader = await command.ExecuteReaderAsync(
CommandBehavior.SequentialAccess, ct).ConfigureAwait(false);
var results = new List<T>();
while (await reader.ReadAsync(ct).ConfigureAwait(false))
results.Add(ReflectionMapper.FromReader<T>(reader));
return results;
}
private static void AddParameters(
SqlCommand command, object? parameters)
{
if (parameters is null)
return;
foreach (var property in parameters.GetType().GetProperties(
BindingFlags.Public | BindingFlags.Instance))
{
if (!property.CanRead ||
property.GetIndexParameters().Length != 0)
continue;
var value = property.GetValue(parameters) ?? DBNull.Value;
command.Parameters.Add(
new SqlParameter(property.Name, value));
}
}
}
The parameter object should contain simple values, not another entity with relationships. That distinction prevents accidental parameter explosions when an object graph is supplied by mistake. SQL names remain constant for each operation, while runtime values travel through the provider’s parameter collection and retain appropriate database types.
Commands, readers and connections have different lifetimes. The extension owns the command and reader it creates, but it does not open or close the caller’s connection. A repository can pass a SqlTransaction into each call, manage the transaction boundary and keep connection ownership explicit. The query buffers rows, so large reports should be paged rather than loaded without limit.
Test the mapper against a real database
Reflection is straightforward to unit-test in isolation, but the useful checks happen against SQL Server. Create a small test schema and exercise inserts, null values, decimals, enums and empty result sets. Capture the generated command text and assert that its placeholders match the parameters supplied at execution time.
Use a disposable database or transaction for integration tests so runs remain repeatable. Australian e-commerce systems often store AUD amounts, so decimal precision deserves explicit tests rather than assumptions about floating-point conversions. Dates should also be tested around daylight-saving transitions, since Sydney and Melbourne change their clocks while Brisbane maintains one consistent time zone.
Hybrid infrastructure is common in the Australian market, so the same contract should work with an on-premises SQL Server and an Azure-hosted instance. Avoid features that differ unnecessarily between them, and verify that connection handling integrates with the hosting application’s logging and secret configuration. Record identifiers and durations, not raw customer details.
Use the mapper in practical services
A small service can use the extensions directly, or hide them behind a focused repository. The following calls show the intended shape: SQL is visible, anonymous parameter objects carry values, and returned entities remain ordinary C# classes.
var customers = await connection.QueryAsync<Customer>(
"SELECT Id, Name, Email, CreatedAt FROM dbo.Customers WHERE Name LIKE @Name",
new { Name = "%Smith%" });
await connection.ExecuteAsync(
"UPDATE dbo.Customers SET Email = @Email WHERE Id = @Id",
new { Email = "alex@example.com", Id = 42 });
This approach works particularly well in ASP.NET Core applications that read a limited set of records, publish domain events or call a reporting view. It avoids a heavyweight persistence dependency while still removing repetitive reader loops. It also suits scheduled jobs and command-line utilities where transparent SQL and quick diagnosis matter more than object tracking.
Broader ecosystem context comes from the C# Corner conference 2020 programme, which lists sessions across C#, Azure, data, DevOps and AI, speaker profiles and a multi-day agenda. That mix reflects the wider needs of Australian software teams: useful abstractions, but grounded in the systems they already operate.
The result is a readable implementation of the central idea: use reflection to remove repetitive mapping, use parameters to protect data flow, and keep execution close to the SQL. That combination makes a simple ORM easier to review, extend and trust.
1, CBD, Maharaj Surajmal Road, Near Yamuna Sports Complex, Delhi, 110032
GENERAL QUERIES
Manish Tewatia
manish@csharpcon.com
+91-9718-431-042
TICKET QUERIES
Atul Gupta
conference@csharpcon.com
+91-9910-125-804