Execute Powershell in SSIS Using C#

Introduction

PowerShell is a Shell included in Windows to automate tasks in the operative system and other applications like SQL Server, SharePoint and Internet Information Services. You can create reports, start services, check the hard drive space, verify the RAM and more.

PowerShell can now be installed in Linux, Docker, and Mac.

You can use loops, comparisons, conditionals and more to create powerful scripts to automate tasks like creating Virtual Machines or SQL Servers in Azure.

In this new article, we will learn how to use the script task to invoke PowerShell in C#. The script task in SQL Server Integration Services (SSIS) allows using C# or VB code to extend the SSIS features. (more…)

ASP.NET Core MVC: Feature Folders

The first version of ASP.NET MVC appeared back in 2009, and the platform (ASP.NET Core) was first relaunched last summer. During this time, the default project structure has remained almost unchanged: folders for controllers, views, and often for models (or perhaps ViewModels). This approach is called Tech folders. After creating a new ASP.NET Core MVC project, the organization structure of folders is the following:

(more…)

Type Conversion in .NET

Introduction

Such a simple topic as type conversion would seem to be unworthy of the whole article. In C#, there is a suitable operator “(T)value” and types that implement it. So, this topic may be considered as closed. However, for 14 years of .NET existence, BCL developers and other programmers have come up with other four ways to convert value types.

(more…)

Specification Design Pattern in C#

In computer programming, the specification pattern is a particular software design pattern, whereby business rules can be recombined by chaining the business rules together using boolean logic. The pattern is frequently used in the context of domain-driven design.

In short, the main benefit of using “specifications” is a possibility to have all the rules for filtering domain model objects in one place, instead of a thousand of lambda expressions spread across an application.

(more…)

Why Using Unit Tests is a Great Investment into High-Quality Architecture

I have decided to write this article in order to show that unit tests are not only a tool to grapple with regression in the code but is also a great investment into a high-quality architecture. In addition, a topic in the English .NET community motivated me to do this. The author of the article was Johnnie. He described his first and last day in the company involved in the software development for business in the financial sector. Johnnie was applying for the position – of a developer of unit tests. He was upset with the poor code quality, which he had to test. He compared the code with a junkyard stuffed with objects that clone each other in any unsuitable places. In addition, he could not find abstract data types in a repository: the code contained only binding of implementations that cross request each other.

(more…)