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 Mocking Entity Framework DbContext with Moq

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 3: configuring the fields typologies

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 Manage tables data with AngularJS Part 1: tables metadata

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 ASP.NET SignalR and TypeScript in an AngularJS SPA

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 Improve performance of a recursive method with Redis