💻.NET Framework

For this project, we have chosen to utilize the .NET framework, specifically version 8.0, developed by Microsoft. .NET provides a versatile and comprehensive development environment, offering tools, libraries, and languages to create a wide range of applications.

One of the key aspects of our implementation is the use of the Model-View-Controller (MVC) architectural pattern, which promotes a structured approach to building applications by separating concerns related to data, presentation, and logic.

Why .NET 8.0?

The decision to adopt .NET 8.0 for our project was influenced by several factors:

  1. Language Interoperability: .NET supports multiple programming languages, including C#, which we have chosen for its simplicity, type safety, and extensive tooling support. C# enables us to write clean, maintainable code with features such as generics, lambda expressions, and asynchronous programming.

  2. Rich Ecosystem: .NET offers a rich ecosystem of libraries, frameworks, and tools that streamline development processes. From ASP.NET MVC for web development to Xamarin for mobile app development, .NET provides comprehensive solutions for various application domains.

  3. Performance and Scalability: .NET applications are known for their performance and scalability, making them suitable for both small-scale projects and enterprise-level systems. The runtime optimization provided by the Common Language Runtime (CLR) ensures efficient execution of code, while features like Just-In-Time (JIT) compilation enhance performance.

  4. Security: Security is a top priority in modern software development, and .NET offers robust security features to protect applications from vulnerabilities such as SQL injection, cross-site scripting (XSS), and cross-site request forgery (CSRF). Features like built-in encryption libraries, identity management, and role-based access control contribute to a secure development environment.

  5. Azure Integration: .NET provides seamless integration with Microsoft Azure, a cloud computing platform that offers a wide range of services for building, deploying, and managing applications. With built-in support for Azure services such as Azure App Service, Azure Functions, and Azure SQL Database, .NET simplifies the process of deploying and scaling applications in the cloud.

Overall, the combination of .NET's language versatility, MVC architecture, performance capabilities, security features, and Azure integration makes it a compelling choice for building modern, scalable applications like the one in our project.

Utilizing Entity Framework Core

In this project, Entity Framework Core (EF Core) was employed as the Object-Relational Mapping (ORM) framework for database interactions within the .NET environment. EF Core simplifies the process of working with databases by allowing developers to work with database entities using familiar object-oriented programming techniques.

By utilizing EF Core, developers can define database models as classes and perform CRUD (Create, Read, Update, Delete) operations on these entities without having to write complex SQL queries manually. EF Core handles the translation of these operations into SQL queries, abstracting away much of the underlying database interaction complexity.

Key features of Entity Framework Core include:

  • Code-First Approach: Developers can define database models using C# classes, and EF Core generates the corresponding database schema based on these classes.

  • LINQ Integration: EF Core seamlessly integrates with LINQ (Language-Integrated Query), allowing developers to write database queries using familiar syntax.

  • Migration Support: EF Core provides tools for managing database schema changes through migrations, making it easy to evolve the database schema alongside application development.

  • Cross-Platform Compatibility: EF Core is designed to work across different platforms, enabling developers to build applications that can run on various operating systems.

By leveraging Entity Framework Core in conjunction with MySQL, developers can write efficient and maintainable code for database operations, enhancing productivity and scalability in the project.

Setting Environment Variables for Database Migrations in Entity Framework Core

When executing the Add-Migration or Update-Database commands in the Package Manager Console in Visual Studio, you may need to manually set environment variables to ensure that the commands use the correct values from the environment configurations.

Steps to Set Environment Variables in the Package Manager Console:

  1. Open Visual Studio and navigate to the Package Manager Console (Tools > NuGet Package Manager > Package Manager Console).

  2. Before executing the Add-Migration or Update-Database commands, manually set the environment variables using the set command. For example:

    set userid=your_username
    set pwd=your_password
    set port=your_database_port
    set database=your_database_name