Often, when we write complex entity framework queries we would want to check how the translated query looks like or simply we would want to monitor the efficiency of it. If we have SQL Server Management Studio, we can leverage SQL Profiler to track all the queries on a specific database: This is not very... Continue Reading →
Resetting Entity Framework migrations
It's very often that when working on projects that has years of life and we are using Entity Framework, the migrations growth a lot over time and suddenly we encounter problems when we try to add new ones. Furthermore, opening the migrations folder and see tons of migration files is not very nice, so we... Continue Reading →
Deleting related entities with entity framework
Entity framework has some features and peculiarities that are useful in a lot of situations and with they can help us to do some operations in very smart and efficient mode. Anyway in some circumstances it could surprise us with some very strange side effects or behaviors that may we don't know; we can meet... Continue Reading →
Performance improvements in Entity Framework 6.2
Once Entity Framework was released few months ago, the first question in my mind was: why Microsoft released a new version of EF6 when the main new branch is EF Core? What the necessity that force the team to release a new version could be? Well, EF 6.2 contains a bunch of new improvements, for... Continue Reading →
Mocking Entity Framework DbContext with Moq
When we have to test methods that involves Entity Framework, a typical choice that we have to face is use integration tests, with an effective database, or unit tests. If we choice the first option, with a database like SQL LocalDB, we'll have performance problems because the cost of the database creation and the data... Continue Reading →
Manage tables data with AngularJS Part 3: configuring the fields typologies
The last part of this argument is configuring the field typologies of the tables to manage. What you need to do is specify for one or more fields of the table a couple of informations, like the typology of the field (text, number, radio, dropdown) and perhaps a list of values. Also we might want... Continue Reading →
Manage tables data with AngularJS Part 1: tables metadata
During the deployment of an AngularJS app, we often develop controllers and views to manage data of basic tables, such as zip, city, country and so on. We need to offer to the users the CRUD operations of these tables; the functionalities and the structure of these controllers/view are very similar and you need to... Continue Reading →
ASP.NET SignalR and TypeScript in an AngularJS SPA
SignalR is a javascript library for helping developers to add real-time functionalities to web applications. This example is a Angular SPA developed using Typescript, to take advantage of Object Oriented features in the client-side code development. This application has a simple orders list, that every user can manage; every time a user make a change... Continue Reading →
Improve performance of a recursive method with Redis
Recursive method are very useful to process for example, parent/child relations and build organization trees. But for complex trees is very frequently to encounter performance problems, specially if the tree is build for every request. In my case, the hierarchical tree is composed on two sql table (node and relations); the problem was that with a large... Continue Reading →