What Entity Framework Core is and How to Enable it in your C# Projects in Visual Studio

In this article, you will learn what Entity Framework Core is and how to enable it in your C# Projects in Visual Studio. Entity Framework Core, is the Cross-Platform version of ADO .NET Entity Framework. In one of my older articles, I have provided an introduction to Entity Framework. Entity Framework Core, as mentioned above, is its … Read more…

.NET Programming for Beginners – Windows Forms (C#)

Hi there! We are happy to announce our brand new course titled: “.NET Programming for Beginners – Windows Forms (C#)“. We are really excited about this course, since via the course, we share our passion, expertise, as well as tips and tricks, about Windows Forms (WinForms) programming in .NET, using Visual Studio and C#. But … Read more…

There was an error reflecting type… (.NET/C#)

Let’s say you have a C# (or VB.NET) project with namespace “MyProject” and you are trying to serialize a class named “MyClass” and you get the error message: There was an error reflecting type ‘MyProject.MyClass’. The first thing to check, is that the class which you want to serialize (that save it to disk), contains … Read more…

Microsoft SSIS Service failed to start. Configuration system failed to initialize

In this article, we will be discussing about the error message: “Microsoft SSIS Service failed to start. Configuration system failed to initialize”.  We will talk about what this error message means, as well as, how you can resolve it.   About the “Microsoft SSIS Service failed to start” Issue It happened at some point to … Read more…

Using the C# SqlParameter Object for Writing More Secure Code

C# SqlParameter is a handy feature allows you to safely pass a parameter to a SqlCommand object in .NET. A security best practice when writing .NET data access code, is to always use parameters in SqlCommand objects (whenever parameters are required of course). The reason for this, is that parameters help prevent SQL injection attacks. … Read more…

The Net.Tcp Port Sharing Service service on Local Computer started and then stopped

This article, discusses the root cause for the error message “The Net.Tcp Port Sharing Service service on Local Computer started and then stopped” and suggests a solution to the issue.   The Root Cause for the Error Message Under certain circumstances, you might be experiencing problems with the “Net.Tcp Port Sharing” Service on Windows Server, … Read more…

Cannot declare instance members in a static class

This short post examines the error message “Cannot declare instance members in a static class” when developing in C# in Visual Studio. This article provides useful information such as how you can reproduce the error message in order to better understand its root cause, as well as how you can resolve the issue. Reproducing the … Read more…

How to Establish a Simple Connection from a C# Program to SQL Server

This article, provides a basic example, on how to establish a connection to SQL Server from a C# program with the use of the “using” statement in C# which help you better managing your database connections.   Using the System.Data.SqlClient Use the System.Data.SqlClient namespace in the top section of your code as below: using System.Data.SqlClient;   … Read more…

Cannot implicitly convert type ‘string’ to ‘System.Windows.Forms.DataGridViewTextBoxColumn

When developing a .NET application (i.e. in C#), under certain circumstances, you might get the error message: Cannot implicitly convert type ‘string’ to ‘System.Windows.Forms.DataGridViewTextBoxColumn   Example of Exception in Visual Studio when Using the Reserved Word “Name” as a DataGridView Column Name.   Why you got the implicit conversion error If you get the above error, … Read more…

The timeout period elapsed prior to obtaining a connection from the pool

If you are working with .NET applications, at some time you might get the below (or similar) error message: Timeout expired.  The timeout period elapsed prior to obtaining a connection from the pool.  This may have occurred because all pooled connections were in use and max pool size was reached.   Why you get the connection … Read more…

The Entity Framework – Part 2 – Inheritance

As promised on my previous Entity Framework-related post I will try through a series of posts which will contain examples, to talk about the ADO. NET Entity Framework and all the cool features it provides the developer with. This post discusses Inheritance in ADO .NET Entity Framework. Inheritance allows creating entities having as base type … Read more…

The ADO .NET Entity Framework

This article, in an introduction to ADO .NET Entity Framework, Entity Data Model and gives an overview of this great technology.   The Problem ADO .NET Entity Framework Solves During the development cycle of a database application, the developer may face issues having to do with the fact that the logical (relational) and related infrastructure … Read more…