CompanyMvc is a simple ASP.NET MVC application for managing company employees and departments. This project demonstrates basic CRUD (Create, Read, Update, Delete) operations and provides a straightforward example of how to use ASP.NET MVC to build a web application.
- Employee Management: Create, view, edit, and delete employee records.
- Department Management: Manage company departments and associate employees with departments.
- Validation: Form validation for employee and department data.
- Database Integration: Use Entity Framework for database interactions.
Before you begin, ensure you have the following software installed on your machine:
- .NET Core (version 5 or higher)
- Visual Studio (2019 or later)
- SQL Server or SQL Server Express
-
Clone the repository:
git clone https://github.com/Mo7ammedd/CompanyMvc.git cd CompanyMvc -
Open the solution:
- Open
CompanyMvc.slnin Visual Studio.
- Open
-
Restore NuGet packages:
- Visual Studio should automatically restore the required NuGet packages. If not, go to
Tools > NuGet Package Manager > Manage NuGet Packages for Solution...and restore the packages.
- Visual Studio should automatically restore the required NuGet packages. If not, go to
-
Update the database connection string:
- In
Web.config, update the connection string to point to your SQL Server instance.
- In
-
Run the migrations (if needed):
- Open the Package Manager Console in Visual Studio and run the following commands:
Update-Database
- Open the Package Manager Console in Visual Studio and run the following commands:
-
Build and run the application:
- Press
F5in Visual Studio to build and run the application.
- Press
- Employee Management: Navigate to
/Employeesto manage employees. - Department Management: Navigate to
/Departmentsto manage departments.
Contributions are welcome! If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.