Get notification to e-mail when I post something

First of all – thanks to all my blog readers to be here with me. Last year was the one where the most important metric of blogs – number of page views – made its yearly record and reached a million. What should I say? Thanks a million! As some of you have asked my for one feature my blog should have I’m glad to tell you it’s here – yes, you can get e-mail notifications about new posts published here.

Read more

Using CSOM from Azure Functions

I got back to active SharePoint development some months ago and first thing to do was to port bunch of workflows from in-prem SharePoint to cloud. Where I live we don’t usually have any simple workflows. Most of them need some backing code due to custom logic. So, my only option was to go with Microsoft Flow or Azure Logic Apps and Azure Functions. Here’s the project with one dummy function to get started.

Read more

Logging NHibernate SQL commands to debug window

I know there are advanced tools like SQL Server Profiler and NHibernate Profiler but often I want to see NHibernate queries just in debug window to have overview of what’s going on. It’s specially important when improving some legacy application where previous developers had not much idea how NHibernate works. Here’s the simple solution I’m using to get SQL generated by NHibernate to Visual Studio debug window.

Read more

Using configurable composite command in multi-tenant ASP.NET Core application

My previous posts about tenant-based dependency injection and using composite command in ASP.NET Core culminated with idea to use configurable composite commands in multi-tenant ASP.NET Core applications. Configurable composite commands make it easy to tweak save and update processes that contain multiple steps of what some can be custom and their activation is based on tenant configuration. Here’s how to build thost composite commands.

Read more

Readable fluent queries with Entity Framework Core

After my first experiments with Query Specification pattern on Entity Framework Core I came to interesting idea – why not using extension methods that wrap query specifications or add directly some more conditions to IQueryable the way that queries are easy to read. Here’s my experiment and thoughts of fluent readable queries.

Read more

Implementing Query Specification pattern in Entity Framework Core

My previous blog post No need for repositories and unit of work with Entity Framework Core showed how Repository and Unit of Work patterns are already implemented in Entity Framework Code (and NHibernate) and how we can use IDataContext generalization to get ORM-s behind same interface. As I’m still trying to find out what’s the best place where to isolate queries without exposing IQueryable I started playing with Query Specification pattern.

Read more

No need for repositories and unit of work with Entity Framework Core

After working again on codebase where Entity Framework Core was used through repository and unit of work patterns I decided to write eye-opener post for next (and maybe even current and previous) generations about what Entity Framework has to offer in the light of these to patterns. In many cases we don’t have to move away from database context approach but stick with it even more than we first planned. Here’s how many useless repositories and units of work born and here’s also how to avoid these and go with implementations offered by Entity Framework Core.

Read more

How to make ASP.NET Core compile modified views

ASP.NET Core 3.0 applications doesn’t build views automatically by default when changes are made. Views are built when application compiles and this is expected final state for views. It’s still possible to make ASP.NET Core application build views when changes are made. Most popular case is when application is running on Visual Studio and we are working on cosmetics of view.

Read more