When building software in C# and .NET we need to create secure codes to make sure that the software is running well. Here are some keys steps to implement secure code:
Input validation. Always validate user input to prevent attacks like SQL injection and cross-site scripting (XSS).
using System.Text.RegularExpressions;
string userInput = GetUserInput();
if (!Re...
[More]
If you are new in .NET web application development, you might want to consider using ASP.NET web forms. However, .NET has several options to choose from. Today we will discuss ten questions that you might be asked for ASP.NET?
is asp.net web forms still life? OFF course! asp.net web forms are great for newbie developer, you can learn here ASP.NET Web Forms | Microsoft Learn
when i choose ...
[More]
With the end of Visual Studio 2022's lifecycle approaching, many developers are wondering why they should continue using Visual Studio when all its features are now available in Visual Studio Code. Here's why Visual Studio still holds its ground:
Comprehensive Development Environment
Visual Studio offers a comprehensive development environment with advanced tools for debugging, testing, ...
[More]
In the ever-evolving field of software development, methodologies and tools constantly adapt to meet the needs of developers and businesses. One such tool that has been around for decades is the Unified Modeling Language (UML). Introduced in the mid-90s, UML quickly became a standard for visualizing and designing software systems. But in 2024, with the advent of new technologies and agile methodol...
[More]
Machine learning becomes famous lately, many people are learning Machine learning because of the potential in the era of AI. On this post, i want to share some highly recommended books for beginners in machine learning.
"Machine Learning for Absolute Beginners" by Oliver Theobald: This book is perfect for those with no coding experience or background in math. It's written in plain English...
[More]
DevOps Engineer has essential role to make sure the development and operation is efficient. On this post, we discuss 9 keys skill that we need to prepare as DevOps engineer
Continuous Delivery: Understanding and implementing continuous delivery systems and methodologies on Azure or AWS.
Cloud Skills & Best Practices: Proficiency in AWS services, tools, and best practices, including d...
[More]
Step-by-Step Guide
Set Up Your Environment:
Ensure you have Visual Studio installed.
Install the necessary NuGet packages: Moq and xUnit.
Create Your Database Mock:
Use Moq to create a mock database context.
Write Your Unit Test: Define
your test cases using the xUnit framework.
Use the mock objects to simulate database interactions.
Example
Let's say you have a funct...
[More]
Here are some tips and tricks to improve the performance of the application .net at Azure App Services:
Activate http/2. HTTP/2 offers an increase in performance through header and multiplexing compression, which allows more simultaneous demand without blocking each other. Make sure to activate http/2 in your application platform settings
Turn off the Application Request Routing Cookie. If you...
[More]
In the past, we have ADO.NET that use data reader and dataset that provides awesome performance in .NET era. Some of our customer uses ORM like XPO or Core Entity Framework that works just like ORM. f you're looking for a lightweight and high-performance ORM (Object-Relational Mapper) for your ASP.NET applications, Dapper is a fantastic choice. Known for its speed and simplicity, Dapper allows you...
[More]
In the era of digital transformation, virtual training has become a cornerstone for educational institutions and corporations alike. Microsoft Teams, a hub for teamwork and communication, offers a robust platform for conducting virtual training sessions. However, to leverage the full potential of Microsoft Teams for training purposes, a compatible and efficient hardware setup is essential. On this...
[More]