Skip to content

Timur and associates

Notes of an IT contractor

Tag Archives: c#

LINQ: Dynamic Join

Photo by Ilya Pavlov on Unsplash

Suppose we’ve got two lists that we would like to join based on, say, common Id property. With LINQ the code would look something along these lines: resulting list of […]

Posted bytimur21/12/202021/12/2020Posted inDev TipsTags: c#, howto

ASP.Net Core – Resolving types from dynamic assemblies

It is not a secret that ASP.NET core comes with dependency injection support out of the box. And we don’t remember ever feeling it lacks features. All we have to […]

Posted bytimur03/12/202010/12/2020Posted inDev TipsTags: aspnetcore, c#, howtoLeave a comment on ASP.Net Core – Resolving types from dynamic assemblies

Attaching debugger to dynamically loaded assembly with Reflection.Emit

Database

Imagine a situation where you’d like to attach a debugger to an assembly that you have loaded dynamically? To make it a bit more plausible let us consider a scenario. […]

Posted bytimur03/11/202028/11/2020Posted inDev TipsTags: c#, howtoLeave a comment on Attaching debugger to dynamically loaded assembly with Reflection.Emit

Parsing OData queries

Photo by Ilya Pavlov on Unsplash

OData (Open Data Protocol) is an ISO approved standard that defines a set of best practices for building and consuming RESTful APIs. It allows us write business logic and not worry too […]

Posted bytimur06/09/202010/10/2020Posted inDev TipsTags: c#Leave a comment on Parsing OData queries

Entity Framework Core 3.1 – Peeking Into Generated SQL

Writing LINQ that produces optimal SQL can be even harder as developers often don’t have visibility into the process. It becomes even more confusing when the application is designed to […]

Posted bytimur06/07/202013/08/2020Posted inDev TipsTags: c#, ef-core, howto1 Comment on Entity Framework Core 3.1 – Peeking Into Generated SQL

Walking code with Roslyn

It was going to happen sooner or later – our research on C# dynamic features eventually ended up with an attepmt to parse bits of source code. There are quite […]

Posted bytimur12/05/202012/05/2020Posted inDev TipsTags: c#1 Comment on Walking code with Roslyn

Entity Framework Core 3 – Custom Functions (Using IMethodCallTranslator)

Database

Every now and then Stack Overflow provides fantastic opportunities to learn something new. One user asked whether SQL Server’s DECRYPTBYPASSPHRASE can be implemented with Entity Framework Core 2.2 so they […]

Posted bytimur26/01/202023/02/2020Posted inDev TipsTags: c#, ef-core, howto

EF Core 3: Getting model metadata from dynamically loaded assembly with IL Emit

Yet another Stack Overflow question has sparked a heated discussion and got us thinking whether we can do better. In a nutshell, the question was about finding a way to […]

Posted bytimur31/12/201908/08/2020Posted inDev TipsTags: c#, ef-core

Custom Routing in .NET WebAPI

We all need to do weird things sometimes. One assignment we’ve got was to implement an API that would totally obfuscate all parameters in a Base64 encoded string. This will […]

Posted bytimur06/06/201904/03/2020Posted inDev TipsTags: c#, howto, httpcontext, webapi

Making Swagger to get the authorization token from URL query string

Swagger is extremely useful when developing and debugging Web APIs. Some dev environments however got a bit of security added on top which can get a bit too painful to […]

Posted bytimur20/02/201917/02/2020Posted inDev TipsTags: c#, howto, swagger

Posts navigation

1 2 Older posts
Timur and associates, Proudly powered by WordPress. Privacy Policy