How To

How to convert binary to decimal in C#?
By Tan Lee Published on Nov 15, 2024 295

To convert a binary number to a decimal number in C#, you can manually process the binary digits, or you can use built-in methods like Convert.ToInt32 for a more straightforward approach.

How to connect to MongoDB in C#
By Tan Lee Published on Nov 15, 2024 308

To connect to MongoDB from a .NET application using the official MongoDB .NET driver, follow these steps.

How to get Mongo database specified in connection string in C#
By Tan Lee Published on Nov 15, 2024 249

To get the MongoDB database specified in the connection string in C#, you can use the MongoDB .NET driver.

mongodb connection string
By Tan Lee Published on Nov 15, 2024 165

A MongoDB connection string is used to connect to a MongoDB database from an application.

Download AdventureWorks sample database for SQL Server
By Tan Lee Published on Nov 13, 2024 1.11K

These downloads include scripts and full database backups (.bak) files that allow you to install the AdventureWorks (OLTP) and AdventureWorksDW (data warehouse) sample databases on your SQL Server instance.

How to Use IExceptionHandler in ASP.NET Core
By Tan Lee Published on Nov 13, 2024 482

In ASP.NET Core, IExceptionHandler is used to handle exceptions that occur during the processing of a request.

How to custom exception handling in ASP.NET Core
By Tan Lee Published on Nov 13, 2024 345

To implement custom exception handling using the IExceptionHandler interface in ASP.NET Core, follow these steps.

How to check if HttpPostedFileBase is an image
By Tan Lee Published on Nov 13, 2024 385

To check if an HttpPostedFileBase is an image in an ASP.NET MVC application, you can verify the file's MIME type (content type) and/or its file extension to determine if it's an image.

How to upload Multiple File in ASP.NET MVC
By Tan Lee Published on Nov 13, 2024 251

In ASP.NET MVC, uploading multiple files can be done easily using the HttpPostedFileBase class.

How to create a custom AuthorizeAttribute in ASP.NET Core
By Tan Lee Published on Nov 12, 2024 712

In ASP.NET Core, the AuthorizeAttribute no longer provides the AuthorizeCore method as in previous versions of ASP.NET MVC

How to manually resolve a type using the ASP.NET Core MVC
By Tan Lee Published on Nov 12, 2024 465

In ASP.NET Core MVC, the built-in Dependency Injection (DI) framework handles most of the dependency resolution automatically, but sometimes you may need to manually resolve a dependency.

How to fix 'Reference does not allow partially trusted callers' warnings in Visual Studio
By Tan Lee Published on Nov 11, 2024 376

This warning typically arises in situations where your project is running in a partial trust environment and the referenced assembly does not explicitly support being called in partial trust.