Persisting SignalR Connections Across Page Reloads
I recently had the need to keep a SignalR connection even if the page would reload. As far as I know, this cannot be done out of the box, either with hubs or persistent connections. I looked it up, but...
View ArticleVisual Studio Tips 3
Next round of Visual Studio tips! 10 more for you! Here you can find the first and the second posts.Change solution version: you can change the Visual Studio solution version by opening the .SLN file...
View ArticleThe Evolution of .NET Dependency Resolution
IntroductionDependency Resolution (RS), Dependency Injection (DI) and Inversion of Control (IoC) are hot topics nowadays. Basically all frameworks are aware of it, or offer some mechanisms to help...
View ArticleThrowing Exceptions and Keeping the Stack Trace
Since its beginning, C# offered two ways to rethrow an exception in a catch block:With the caught exception as a parameter to throw; (e.g.: throw ex);Without any explicit parameter, in which case, it...
View ArticleUsing ASP.NET 5 Tag Helpers and the Bing Translator API
IntroductionIf you’ve been following my posts you probably know that I have been a critic of MVC because of its poor support of reuse. Until now, the two main mechanisms for reuse – partial views and...
View ArticleASP.NET 5 View Components
One of my favorite features in ASP.NET 5 / MVC 6 is View Components. Like I said of Tag Helpers, I think they are what MVC was missing in terms of reusable components.View Components are similar to...
View Article.NET Core Reloaded
OK, so here’s another post on .NET Core from a non-code perspective. There has been recently lots of discussion about this all over the Internet!We are all well aware that .NET Core, which hasn’t been...
View ArticleImplementing Missing Features in Entity Framework Core – Part 4: Conventions
ConventionsThis will be the fourth in a series of posts about bringing the features that were present in Entity Framework pre-Core into EF Core. The others are:Part 1: Introduction, Find, Getting an...
View ArticleASP.NET MVC Core: The Good Parts
MVC 6 should be out any day, so we need to be prepared.The good thing is, it’s all very similar to MVC 5; the even better thing is, it got better! A couple of ways it is so cool, in my mind, are:Most...
View ArticleMoving to ASP.NET MVC Core 1
IntroductionThe new version of ASP.NET MVC, Core 1, brought a number of changes. Some were additions, but others were removals.The structure is similar and will be mostly familiar to anyone who has...
View ArticleUnit Testing .NET Core
IntroductionWith the recent arrival of .NET Core, some things that we were used to having are no longer available. This includes unit tests – plus Visual Studio integration - and mocking frameworks....
View ArticleImplementing Missing Features in Entity Framework Core – Part 5: Getting the...
This will be the fifth post in a series of posts about bringing the features that were present in Entity Framework pre-Core into EF Core. The others are:Part 1: Introduction, Find, Getting an Entity’s...
View ArticleMissing Features in Entity Framework Core 1
Updated: with EF Core 1.1.Here’s a brief summary of some of the features that were present in previous versions of Entity Framework (6.x) and were excluded (or are not yet implemented) in Entity...
View ArticleEntity Framework Pitfalls: Queries Over Navigation Properties When There Are...
Long title, I know! Another one for Entity Framework Code First. The problem is: imagine you have an entity with a relation to another entity (one-to-one, many-to-one) where you have both the...
View ArticleSQLPort em Aveiro
(Portuguese only, sorry!)No próximo dia 22 de Setembro irá ter lugar em Aveiro, nas instalações da Fusion Cowork (Fusion 2), o LXXXVI evento da Comunidade SQLPort, o primeiro dos quais em Aveiro!Os...
View ArticleEntity Framework Pitfalls: Null Semantics
Imagine you have a simple class:publicclass MyEntity{publicint Id { get; set; }publicstring Name { get; set; }}You may want to query it:string name = ...;var entities = ctx .MyEntities .Where(x =>...
View ArticleComing Up Next
Updated on October 24thThe following topics have been somewhat neglected… I promised to write follow ups to existing posts, but have been unable to so far. Hopefully I will resume them soon, in some...
View ArticleVisual Studio Tips 4
OK, so this is another round of tips on using Visual Studio! See first collection here, second here and third here.Create shortcuts: you can create shortcuts to frequently used code. Just click...
View ArticleEntity Framework Pitfalls: Skip/Take Position Matters
In LINQ, you normally do paging through the Skip and Take operators. These are the LINQ counterparts to whatever the relational database uses for pagination – ROW_NUMBER(), LIMIT…OFFSET, TOP, ROWNUM,...
View ArticleInterception in .NET – Part 3: Static Interception
Updated: see the final post in the series here.IntroductionPart three of a series on interception in the .NET world. See the first part here and the second here.This time I’m going to talk about static...
View Article