This website uses cookies to obtain statistics from users navigation. If you go on browsing we consider you accept them.


Software developer and Web passionate

Latest posts

How to log SQL queries using Entity Framework 6 like in EF Core

Watching the SQL queries Entity Framework executes is quite useful when a slow query needs optimization. If you’re already using ASP.NET Core, you might have already noticed that the debugging stream already outputs these SQL queries for you. But, if you’re working with ASP.NET MVC or ASP.NET Web API projects, by default you won’t see the SQL queries executed by EF.

Why properties are evil

As many of you might already know, properties are a neat way to define getters and setters. Many languages, such as C#, Delphi, Javascript or PHP support them and they are first-class citizens in the .NET ecosystem. Although properties are a handy resource, some property implementations can turn out to be evil. Very evil. Let’s dive into them.

Entity Framework 6 and "There is already an open DataReader"

Entity Framework is an amazing ORM. It has differences with other ORMs like Hibernate or Doctrine, but at the same time feels more comfortable. Two key differences with other ORMs are LINQ as its query language (LINQ it’s a compiled language, if you like to rename stuff you know how many errors this feature can prevent) and being able to use foreign key values without having to join with the related entity.

ETagFilePathResult, an ActionResult to save bandwidth in ASP.NET MVC.

ASP.NET MVC provides several ways to serve files from controllers, but all of them require to serve the entire file content through the network, something that will make our website slow and more expensive while it’s ridiculous to transfer the same content over the network every time the resource is requested. Client-side HTTP caching can easily prevent downloading all those extra bytes. In this post we offer a solution to it without doing any complicated stuff, using the ActionResult abstract class to integrate a solution based on ETags in ASP.NET MVC to implement the client-side caching.

Nativescript. The native alternative to Ionic.

If we had to pick an emerging and changing field in technology throughout development today, Mobile application development would be the most accurate choice. Tools and frameworks in this field are more exposed to bigger changes. That is why, new hybrid mobile app frameworks are emerging again and one of these new frameworks is Nativescript. Nativescript is a new open-source technology by Telerik that enables developing native apps using Javascript or Typescript, that can run on Android, iOS and, in the near future, Windows, with the Windows Universal Apps flavour. This native feature is what puts the de facto hybrid mobile app framework Ionic in peril, making it possible to be replaced by Nativescript, a more performant alternative.

subscribe via RSS