I was following this tutorial for me to be familiar with ASP.NET core and other related tech. https://www.codeproject.com/articles/997216/restful-day-sharp-resolve-dependency-of-dependenci
He mentioned that referencing the DataModel in WebApi project is not a good practice for security reasons. So I did follow him and to my suprise, I can still access classes on DataModel in my WebApi project just by indirectly referencing it via Services.
Below screenshot will show the relationships of the projects to be more clear (from the tutorial).
https://www.codeproject.com/KB/aspnet/990492/image028.jpg
And my actual references on my WebApi project below.
I'm still quite new to .NET and would like to know if that is an expected behavior or this can lead to any security risks.
