
Image from Pexels
Tagged articles - Reflection
Found 13 articles tagged with Reflection
31
Aug
2019
Handling file uploads in Swagger UI with ASP.NET Core
.NET229 titlesSwagger UI file upload in ASP.NET Core WebApi
0
Swagger is the most convenient way to document your REST api endpoints. It provides generating of documentation on the fly based on the code structure, which shortens the time of creating the documentation drastically...read more
19
May
2019
Automatic CQRS handler registration in ASP.NET Core with reflection
.NET229 titlesRegistering all query and command handlers in your CQRS implementation in ASP.NET Core
0
Command Query Responsibility Segregation (CQRS) pattern is one of my favorite way of handling the Web API requests for a simple reason that is clearly separates reading and writing. Quite often at some stage of the project you will hit the performance bottlenecks which are most probably cause by the way you are reading ow writing your data.
CQRS splits reading and writing so that you can independently use different persistence framework for reading and writing...read more
14
Apr
2019
Displaying Azure DevOps build number in Swagger UI for ASP.NET Core
.NET229 titlesHow to add and show Azure DevOps build number in ASP.NET Core project and Swagger UI
0
Swagger is a great way to document you REST API endpoints and reduce the need for communication, item spent and the cost for supporting the consumers of you APIs. Apart from providing the info about the endpoints, models, validation it can also display the data of the product...read more
21
Feb
2019
Making reflection in .NET Core work faster
.NET229 titlesTechniques for optimizing reflection in C#
0
Reflection allows accessing type structure and its meta-data in runtime. Using reflection, you can dynamically instantiate objects, access fields, methods and properties regardless of the protection level...read more
04
Jan
2019
SqlBulkCopy object collection to database table with C#
.NET229 titlesPerforming SqlBulkCopy with collection of objects as a source data
0
Over the time various techniques to manipulate database data have evolved in .NET. Entity Framework is certainly the most advanced one, but for small ad hock applications where you have few inserts to deal with, ADO is still the fastest way to write data to the database...read more
02
May
2018
Generic string to primitive type converter in C#
.NET229 titlesConverting string data to any primitive type in .NET and .NET Core
0
Often case when you need to convert String to a different type which is most of the time a primitive type in C# is when you are reading values from configuration. In both .NET and .NET Core, reading from configuration return plain String value...read more
01
Mar
2015
Super lightweight Data Access Layer returning models from ADO
.NET229 titlesReturn strongly typed objects directly from stored procedure calls
0
Entity framework is an awesome tool for working with database in .net, but sometime you have to get back to old fashion ADO for the performances. The bad thing is that as soon as you get back to ADO, you have to deal with SqlDataReader, DataTable and DataSet classes...read more
05
Jan
2015
Application plugin host with assembly caching and auto reloading
.NET229 titlesCaching and loading plugins dynamically when plugin library updates
0
Few moths ago I wrote and article about simple way to implement plugin architecture in C# simple plugin host application approach. This approach is great for desktop applications because when you for example need to update (which means replace the plugin dll) you can easily close the app and start it again and it will pickup new code...read more
04
Jan
2015
JavaScript Eval function equivalent in C#
.NET229 titlesExecute C# code string on the fly
0
Probably who ever was working on some complicated dynamic client-side JavaScript used at least once eval functional in JavaScript. Basically this function executes the code which is passed to it as parameter...read more
26
Oct
2014
The server committed a protocol violation. Section=ResponseStatusLine
.NET229 titlesSwitching off header validation in .NET
0
Recently I was adding GitHub project section to my blog when I run into the following exception "The server committed a protocol violation. Section=ResponseStatusLine"
After some time of Google-ing I found few solutions, but the most simplest one was actually the best one...read more
18
Sep
2014
Change Request.Form collection on the fly
.NET229 titlesHow to modify Request.Form collection
0
Data from form are sent to backend (whether code behing of page in WebForms or Controller Action in MVC) in Request.Form property.
It is oragnized as collection of name and value and can be easily access by name. In some extreme cases, you need to make some modifications to posted form data.
...read more
18
Sep
2014
Access auto property backing field with reflection
.NET229 titlesAccess property fields of auto property in C#
0
Using reflection you can easily access any property, filed, methods, pretty much anything of any type in .NET. Reflection is never the most elegant way to do something, but sometime you just have to do it.
In older versions of C#, to declare a simple property in a class you would have to declare a private field which will be exposed by the property outside the class
...read more
06
Sep
2014
Simple object mapper using reflection
.NET229 titlesCopy property values from one object to another using reflection
0
Dealing with models and POCO classes in MVC sometimes require to map properties from one object to another because they have some properties of the same name and type.
This also can be a case when you are loading a model class from some other source and you need to transform it to your type with some additional properties, but also a bunch of properties with values from the source object instance.
...read more
.NET
5
Jun
2022
Using dotnet nuget package vulnerability scan in Azure DevOps build
Listing nuget vulnerabilities and controlling build in Azure DevOps
5
May
2022
Protecting static files in ASP.NET Core using custom middleware
Restricting access to specific static content with middleware in ASP.NET Core
20
Dec
2021
Supporting multiple authentication schemes in asp.net core webapi
Using more than one authentication schemes in webapi projects
12
Dec
2021
Controlling the flow of migrations in EF Core
Altering EF Core migrations execution order
28
Nov
2021
Unit of work pattern with Dapper
Implementing unit of work pattern with Dapper in .NET 5
21
Sep
2021
Adding display name to Enum values
Implementing additional values for Enum items in C#
JavaScript
28
Oct
2018
HTML5 localStorage with expiry with vanilla JavaScript
Using HTML5 localStorage with expiry
8
May
2018
Monitoring DOM changes with JavaScript
Handling DOM changes with plain JavaScript
9
May
2017
Non blocking CSS load on the page
Load external CSS files in an async manner
16
Mar
2017
Serialize html form to JSON without using JQuery
Transform user input from HTML form fields to JSON
17
Jan
2016
Copy text value to clipboard using jQuery
Simple sample of using jQuery to copy value to clipboard
11
Jan
2016
Resize image on the client side with JQuery
Reducing the upload sie by resizing image on the client side
SQL/T-SQL
22
Feb
2022
Select column names with values from SQL Server database
Fetching column names with its value in T-SQL using built in JSON methods
23
May
2020
Identifying opened connections for the specific application in SQL Server
Connection listing queries in SQL Server
3
May
2018
Reading JSON data in T-SQL on SQL Server
Extracting values from JSON string on SQL Server using T-SQL
28
Apr
2016
Create XML/HTML with T-SQL
Generating XML/HTML output in SQL Server
24
Nov
2015
IP address to octets split in TSQL
Split IP addresse into octets in SQL Server
20
Jul
2015
Getting first and last second of the current year, month and day
Using minimum and maximum date time in SQL query
Umbraco CMS
2
Mar
2018
Minify HTML output of your pages
Minification of HTML output using ASP.NET IHttpModule
18
Apr
2015
Generate sitemap.xml on the fly in Umbraco CMS
Simple sitemap.xml Umbraco handler
2
Mar
2015
Accessing UmbracoHelper in HttpHandler request
Working with UmbracoHelper and IPublishedContent in HttpHandler
14
Sep
2014
Same page language switching in Umbraco
Land on the same page in different language in Umbraco using Relations
4
Sep
2014
Getting cropped image the smart way
The way to get cropped image URL with option to load original image too
27
Aug
2014
Fastest way to return JSON result from a controller
Resturn JSON in MVC controller action