Browsed by
Category: Software Engineering

ASP.NET MVC 5: Using a Simple Repository Pattern for Performing Database Operations

ASP.NET MVC 5: Using a Simple Repository Pattern for Performing Database Operations

Abstract: The Repository pattern decouples your ASP.NET MVC application and shields it from changes by creating a boundary between your data access code and the other parts of your application. Recently a client of mine asked for a solution to isolate the direct dependency of the Data Access Layer with the rest of the layers of the application. In this article we will discuss one of the concepts I suggested to him for an ASP.NET MVC application. Typically in multi-layer applications,…

Read More Read More

How to Implement the Repository Pattern in ASP.NET MVC Application

How to Implement the Repository Pattern in ASP.NET MVC Application

The Repository Pattern is one of the most popular patterns to create an enterprise level application. It restricts us to work directly with the data in the application and creates new layers for database operations, business logic, and the application’s UI. If an application does not follow the Repository Pattern, it may have the following problems: Duplicate database operations codes Need of UI to unit test database operations and business logic Need of External dependencies to unit test business logic…

Read More Read More

Batch: An API to bundle multiple PayPal REST operations

Batch: An API to bundle multiple PayPal REST operations

REST APIs are vital business tools that allow merchants, partners and developers to consume and build on top of the various payment capabilities that PayPal provides. Whether it is checkout, recurring payments, vaulting or identity operations there are multiple end to end API interactions involved in each of those business flows. These APIs are also a critical part of the internal Service Oriented Architecture (SOA) at PayPal. Different domains expose various internal capabilities and operations via REST interfaces using which the…

Read More Read More

async/await – What You Should Know

async/await – What You Should Know

Introduction Sometimes, we use new technologies while we are not aware of the bottlenecks and weird parts of that technology which eventually might trap us in bad situations like deadlocks which may be really hard to track. What exactly happens in Task-based Asynchronous Pattern (TAP), what are the improvements since .NET 4.0, how may we introduce a deadlock and how to prevent it? Consider somewhere in your code, you need to do something asynchronous, what are the different ways to do…

Read More Read More

What is the Difference Between a DTO and a POCO?

What is the Difference Between a DTO and a POCO?

First off, I’m not the authority on DTOs, POCOs, object oriented architecture, or really anything now that I stop to think about it.  However, I do use a DTO / POCO centric architecture whenever I can and there’s at least one former client of mine who is now saddled with an entity class named DevicePoco (there was already a Device entity object that followed the Active Record pattern, otherwise I would never have named an object XXXPoco). When my client…

Read More Read More