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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Vishal YelvePosted May 25, 2023, 7:28 AM
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/
Vishal YelvePosted May 25, 2023, 7:26 AM
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 PriyadarshanaPosted May 25, 2023, 6:12 AM
Dear Sir,
I'm a beginner. Do you have a simple Web Api project? (Sql server, 3 layer)
Tharaka PriyadarshanaPosted May 25, 2023, 4:50 AM
Thank you so much.
Rajkiran SwainPosted May 25, 2023, 4:48 AM
https://github.com/jasontaylordev/NorthwindTraders
Tharaka PriyadarshanaPosted May 25, 2023, 4:46 AM
Do you have any repositories.
Rajkiran SwainPosted May 25, 2023, 4:28 AM
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.