Ehsan-org / ASP.NET-FirstProject

1 stars 0 forks source link

added CSS/JS Links and IUnitOfWork Registration Problem #25

Open ehsan-nadernezhad opened 4 weeks ago

ehsan-nadernezhad commented 4 weeks ago
  1. Add the provided CSS and JavaScript links to the Layout.cshtml file.
  2. Register the IUnitOfWork service in the Program.cs file.
  3. Run the application.
  4. Describe any specific actions that lead to the issue in my C# project.
  5. added >>>>>[ builder.Services.AddScoped<IUnitOfWork, UnitOfWork>(); ]<<<< in program.cs and fixed What was the Problem? I encountered dependency injection problem in ASP.NET Core application. The error message indicates that the IUnitOfWork service was not registered in the dependency injection container, so it could not be resolved when trying to activate the CategoryController.

Screenshot 2024-09-18 204552