Dear,
Could I make this project files? Using Interface, Services, error Handling with logger and complete project saparate 3 layers.
Dear,
Could I make this project files? Using Interface, Services, error Handling with logger and complete project saparate 3 layers.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Vishal YelveRank #178 · 13.6K reputationPosted May 25, 2023, 3:28 AM EDT
Hi Tharaka,
you can refer my article.
https://www.c-sharpcorner.com/article/net-core-3-1-web-api-crud/
for logger you cn use Nloger
https://www.c-sharpcorner.com/article/implementation-of-nlog-with-net-6-web-api/
https://www.c-sharpcorner.com/article/global-error-handling-in-asp-net-core-web-api-using-nlog/
Rajkiran SwainRank #165 · 14.4K reputationPosted May 25, 2023, 12:28 AM EDT
Yes, you can certainly structure your ASP.NET Core 6 Web API project using a three-tier architecture approach. This approach helps in separating concerns and improving the maintainability of the project. Here's a general outline of how you can organize your project files:
Presentation Layer (API Controllers):
Business Layer (Services):
Data Access Layer:
Error Handling and Logging:
Remember to configure dependency injection in your ASP.NET Core application's startup file to enable proper dependency resolution and register your interfaces and classes.
By following this three-tier architecture pattern and using interfaces, services, error handling with logging, and separating your project into layers, you can achieve better code organization, maintainability, and testability in your ASP.NET Core Web API project.
Vishal YelveRank #178 · 13.6K reputationPosted May 25, 2023, 3:26 AM EDT
HI Tharaka,
Do refer my artile.
https://www.c-sharpcorner.com/article/net-core-3-1-web-api-crud/
for logger you can use Nloger
also you can refer Rajkiran suggestion
Tharaka Priyadarshana19 reputationPosted May 25, 2023, 12:46 AM EDT
Do you have any repositories.
Rajkiran SwainRank #165 · 14.4K reputationPosted May 25, 2023, 12:48 AM EDT
https://github.com/jasontaylordev/NorthwindTraders
Tharaka Priyadarshana19 reputationPosted May 25, 2023, 12:50 AM EDT
Thank you so much.
Tharaka Priyadarshana19 reputationPosted May 25, 2023, 2:12 AM EDT
Dear Sir,
I'm a beginner. Do you have a simple Web Api project? (Sql server, 3 layer)