Jan 16, 2023
Views: 191
C# AngleSharp tutorial shows how to parse HTML in C# with AngleSharp library.
The library can also parse SVG, MathML, or XML.
AngleSharp GitHub: https://github.com/AngleSharp
Document Object Model (DOM) is a standard tree structure, where each node contains one of the components from an XML structure. Element nodes and text nodes are the two most common types of nodes. With DOM functions we can create nodes, remove nodes, change their contents, and traverse...
more...
Jan 15, 2023
Views: 64
Defined long ago, the SOLID principles are intended to improve the readability, adaptability, extensibility, and maintainability of object-oriented designs. The five SOLID principles of object-oriented class design facilitate the development of understandable, tested software that many developers can use at any time and place.
We give Robert C. Martin, popularly known as Uncle Bob, credit for this idea in his 2000 work, Design Principles and Design Patterns. He’s also known for...
more...
Jan 13, 2023
Views: 266
We are going to discuss the Unit of Work design pattern with the help of a generic repository and step-by-step implementation using .NET Core 6 Web API.
Agenda
Repository Pattern
Unit of Work
Step-by-step Implementation
Prerequisites
Visual Studio 2022
SQL Server
.NET Core 6 SDK
Repository Pattern
The repository pattern is used...
more...
Jan 11, 2023
Views: 130
Database Setup with DbUp + Postgresql + Dapper in ASP.Net Core
In this tutorial, we are going to explore how we can setup our database on startup when using Dapper for accessing database.
When using Dapper, one of the key learning I came to know is that we have to have database and tables already created in advance in order to read/write data.
So we have to write some kind of migration logic...
more...
Jan 10, 2023
Views: 131
Exception Handling is one of the important topics in Software Development. Exception means mainly run-time errors that occur at the time of execution of your application. The developer needs to handle that exception otherwise the application will be terminated.
Every developer has their own way of handling the errors in their code. Some of them are quite comfortable with having a try-catch block in their code and return system exception message....
more...
Jan 6, 2023
Views: 214
Introduction
This article will teach us about effective paging, sorting, and filtering using SQL Server Stored Procedure. Find more about Stored Procedure in SQL Server - Stored Procedure.
Article Overview
Background.
Prerequisites.
How to do effective Paging, Sorting, and Filtering with Stored Procedure.
Complete example.
Summary.
Background
There was a situation where I had to implement fast/effective paging, orting,...
more...
Jan 2, 2023
Views: 187
Simplify complex joins and subqueries using SQL Server Common Table Expressions or CTEs. It also provides a way to query hierarchical data. This article provides a complete overview of CTEs, types of CTEs, benefits, drawbacks, and how to use them with SQL Server.
A Common Table Expression or CTE is a short-lived named result set created from an easy SELECT statement employed in a subsequent SELECT statement. Every SQL CTE is sort...
more...
Jan 2, 2023
Views: 192
In this article, we are going to discuss the working of CQRS and MediatR patterns and step-by-step implementation using .NET Core 6 Web API.
Agenda
Introduction of CQRS Pattern
When to use CQRS
MediatR
Step-by-step Implementation
Prerequisites
Visual Studio 2022
SQL Server
.NET Core 6
Introduction of CQRS Pattern
...
more...
Jan 1, 2023
Views: 91
Here’s the simple step-by-step guide that will teach you how to build and code a generic repository.
There are oodles of design patterns.
Some of these design patterns are floating about on antique blogs full of mad logic. They’re ridiculous enough to make the entire modern cloud rub its belly in roars of laughter.
Other design patterns are worth their dough.
And one of these is the repository pattern.
Of all the design patterns that...
more...
Jan 1, 2023
Views: 129
New and old ways of creating your own exceptions in dotnet with C# 11 and .NET 7.
Let’s talk about building custom exceptions in C# code and why you’d want to do that. We’ll cover the traditional way as well as a newer way you might want to do this using the required keyword in C# 11.
Exception management in dotnet is quite versatile by default with try / catch / throw...
more...
Jan 1, 2023
Views: 153
By software engineering standards, ASP.NET Web Forms can be considered old school. Perhaps I’m aging myself with that statement, but its true. From a software perspective, even 10 years begins to show its age. I started to use Web Forms the year after they were introduced by Microsoft in 2003.
Most of my college years were spent in Web Forms and around 80% of my professional career has revolved around them...
more...
Dec 28, 2022
Views: 135
print media queries
Вы можете стилизировать версию вашего сайта для печати с помощью media query:
@media print {
* {
background-color: transparent;
color: #000 ;
box-shadow: none;
text-shadow: none;
}
}
gradient text
h1 {
background-image: linear-gradient(to right, #C6FFDD, #FBD786, #f7797d);
background-clip: text;
color: transparent;
}
Улучшаем media defaults
Когда пишите css reset файлик, добавьте настройки для мультимедийных файлов:
img, picture, video, svg {
max-width: 100%;
object-fit: contain; /* preserve a nice aspect-ratio */
}
column count
Создаем column лейауты с...
more...
27 декабря 2022 г.
Просмотров: 79
Часто бывает что вам нужно протестировать какую то функцию или метод, однако подобрать имя для теста бывает часто затруднительно. Для этого в этой статье мы рассмотрим несколько самых используемых подходов к именованию Unit тестов.
Ниже приведены несколько популярных условных обозначений, которые, как установлено, используются большинством разработчиков:
MethodName_StateUnderTest_ExpectedBehavior:
Существуют аргументы против этой стратегии, так как если имена методов изменяются после рефакторинга кода, это должно также изменить название теста, это становится трудным для понимания на более...
далее...
Dec 26, 2022
Views: 82
Introduction
Do you find yourself not having enough time in a day? Why isn't the work getting done? And why is it taking so long? If these questions sound familiar, you're not alone. Productivity is very important also while working from home. Staying productive at work can be a challenge, but there are some tips that can help you get more productive.
Set goals, track your progress, and celebrate...
more...
Dec 25, 2022
Views: 134
This article will look at the differences between static and readonly C# fields. Basically, a static readonly field can never be replaced by an instance of a reference type. In contrast, a const constant object cannot be replaced by a new one. You will learn what the difference is and how to use inline initialization with readonly fields. Ultimately, this article will help you write better code.
Readonly prevents a field...
more...
Dec 7, 2022
Views: 155
Keeping our SQL server in a healthy state is a matter of concern for sure. Here users can learn the top 11 SQL server maintenance plan best practices that experts, DBAs, architects, and developers follow. No doubt that users often face difficulties with their SQL server. However, with these practices to keep the database healthy, users can reduce the chances of SQL server errors by 90%. Let’s begin securing the...
more...
Dec 5, 2022
Views: 180
We are going to discuss Caching in .NET Core and how it works. So, we look at the following things one by one.
Introduction of Caching.
What is Cache.
Types of cache.
Cache Implementation.
So, let’s start one by one.
Introduction
Caching is very popular nowadays in the software industry because it will improve the performance and scalability of the application....
more...
Dec 1, 2022
Views: 126
Said no manager ever.
Money is the one thing every candidate at any job interview is advised never to mention. The salary on offer for the role is treated almost like a *dirty secret. Job advertisements only reveal a band or range, which makes sense to a certain extent, given that the candidate may be placed at any point within that band, depending on experience and qualifications. However, in places like...
more...
Dec 1, 2022
Views: 65
A message broker that is particularly powerful and interesting is RabbitMQ, one of the most popular open source tools for that job, used worldwide by large enterprises to small startups.
Nov 25, 2022
Views: 1255
In this article, you will see a Web API solution template which is built on Hexagonal Architecture with all essential features using .NET Core.
Download source code from GitHub
Download project template from Microsoft marketplace
Introduction
This is kick-off project which will have all essential things integrated to it. When we have to start with a new project, then we should think...
more...