Category: Programming
Entity Framework Core is an ORM (Object Relational Mapper) that allows us to leverage LINQ (Language Integrated Query) to abstract away the SQL (Structured Query Language) that would otherwise need to be written for interactions with a database. However, while LINQ is an awesome .NET feature, there are some limitations to be aware of when…
When developing an application that connects to a SQL Server (or Azure SQL) database, you will often want to leverage the features that the database engine provides to help minimise checks that would otherwise need to be performed at the application level. By delegating these checks to the database, you can simplify your application logic,…
When you need to create a .NET application that can be easily deployed to a system without worrying about the installed .NET version or other dependencies, the publishing options that have been made available since .NET Core 3.0 are most welcome. If you are publishing a modern .NET application today, not only is it possible…
In the increasingly fast-paced world of software development, efficiency is a critical factor for success in the marketplace. Visual Studio, Microsoft’s flagship IDE (Integrated Development Environment), is packed full of features designed to make your programming experience as productive as possible. Among these is a lesser-known feature that is extremely useful; the ability to paste…
By default, Entity Framework Core stores and retrieves .NET enumerations as their underlying integer values for SQL databases, primarily for performance and storage optimization reasons. Nevertheless, if there is a requirement to store enums within your data model as strings at the database level, it is important to have a suitable way to configure this…
CSV (Comma-separated values) remains an extremely popular file format, and, in the context of programming, it is particularly useful for importing and exporting data between different software applications. One of the issues with CSV, or any other delimiter-separated file format, is that often the values that need to be parsed into separate ‘parts’ will contain…
C# enumeration types (enums) provide a highly extensible and type-safe way of storing values and they are used frequently in .NET software development. When enums are saved to a SQL database with Entity Framework Core, by default they are stored using their underlying integer values rather than as strings. There are several reasons for this…
The majority of software applications developed today need to work with strings that contain accented characters such as à and é since many human languages use these to indicate variations in pronunciation and other subtleties. Even English borrows some French words that contain accents and other glyphs, such as café, déjà vu, and façade. These…
In light of the recent controversy surrounding the .NET Moq library, many developers are reconsidering their choice of mocking framework for unit testing. The undisclosed inclusion of the proprietary SponsorLink DLL that reportedly extracts internal developer email addresses and uploads them to a remote server has undoubtedly been alarming to many. Beyond the immediate privacy…