Implementing the Repository and Unit of Work Patterns in ASP.NET Core

Posted by Anuraj on Tuesday, February 14, 2017 Reading time :2 minutes

Repository Unit Of Work Design Patterns ASP.NET Core

This post is about implementing the Repository and Unit of Work Patterns in ASP.NET Core. The repository and unit of work patterns are intended to create an abstraction layer between the data access layer and the business logic layer of an application. Implementing these patterns can help insulate your application from changes in the data store and can facilitate automated unit testing or test-driven development (TDD). Long back I wrote a post on implementing a generic repository in ASP.NET 5 (Yes in ASP.NET 5 days, which can be used in ASP.NET Core as well.). So I am not explaining more on Repository pattern. The UnitOfWork pattern is a design for grouping a set of tasks into a single group of transactional work. The UnitOfWork pattern is the solution to sharing the Entity Framework data context across multiple managers and repositories.

Watermark Images on the Fly in ASP.NET Core

Posted by Anuraj on Tuesday, February 7, 2017 Reading time :1 minute

Images ASP.NET Core System.Drawing

This post is about applying Watermark images on the fly in ASP.NET Core. From the initial days of ASP.NET Core image manipulation was a challenge since the System.Drawing library was depend on GDI+ and Microsoft didn’t released a package for image manipulation.

VS2017 RC - a product matching the following parameters cannot be found: channelId: VisualStudio.15.Release

Posted by Anuraj on Tuesday, January 24, 2017 Reading time :1 minute

VS2017 RC VisualStudio

This post is about an installation issue while installing the VS 2017 RC. While installing the VS 2017 RC, the installation was failing, the setup was throwing an exception like this - a product matching the following parameters cannot be found: channelId: VisualStudio.15.Release product Id : Microsoft.VisualStudio.Product.Professional.

Running a specific test with .NET Core and NUnit

Posted by Anuraj on Monday, January 23, 2017 Reading time :1 minute

dotnet core NUnit unit test

This post is about running a specific test or specific category with .NET Core and NUnit. dotnet-test-nunit is the unit test runner for .NET Core for running unit tests with NUnit 3.

Integrate HangFire With ASP.NET Core

Posted by Anuraj on Sunday, January 15, 2017 Reading time :2 minutes

aspnet core HangFire

This post is about integrating HangFire With ASP.NET Core. HangFire is an incredibly easy way to perform fire-and-forget, delayed and recurring jobs inside ASP.NET applications. CPU and I/O intensive, long-running and short-running jobs are supported. No Windows Service / Task Scheduler required. Backed by Redis, SQL Server, SQL Azure and MSMQ. Hangfire provides a unified programming model to handle background tasks in a reliable way and run them on shared hosting, dedicated hosting or in cloud. The product I am working has a feature of adding watermark to the images uploaded by users. Right now we are using a console app, which will monitor a directory in specified intervals and apply watermark to the newly uploaded images. But using HangFire we can schedule / execute the watermark opertation as a background task, instead of polling a directory for new images.

Using MEF in .NET Core

Posted by Anuraj on Friday, January 13, 2017 Reading time :2 minutes

dotnet core MEF aspnet core

This post is about using MEF (Managed Extensibility Framework) in .NET Core. The Managed Extensibility Framework or MEF is a library for creating lightweight, extensible applications. It allows application developers to discover and use extensions with no configuration required. It also lets extension developers easily encapsulate code and avoid fragile hard dependencies. MEF not only allows extensions to be reused within applications, but across applications as well.

Using NLog in ASP.NET Core

Posted by Anuraj on Tuesday, January 10, 2017 Reading time :2 minutes

aspnet core mvc NLog Logging

This post is about using NLog in ASP.NET Core. NLog is a free logging platform for .NET, Xamarin, Silverlight and Windows Phone with rich log routing and management capabilities. NLog makes it easy to produce and manage high-quality logs for your application regardless of its size or complexity.
BMC logoBuy me a coffee

Copyright © 2019 - Anuraj P. Blog content licensed under the Creative Commons CC BY 2.5 | Unless otherwise stated or granted, code samples licensed under the MIT license. This is a personal blog. The opinions expressed here represent my own and not those of my employer. Hosted with ❤ by GitHub