Reputation: 2186
I have the following projects in my solution all .net core 5.0.
myproject.domain
myproject.infrastructre
myproject.webAPI
myproject.UI.Razorweb page.
Instead of using SPA which calls the webAPI, I am using razor web page which will call the webAPI(.net 5.0). My question is can we merge the webAPI and the razorwebpage into one? Can we write webAPI in the razor web page itself?
Is that allowed?
Upvotes: 0
Views: 54
Reputation: 11355
I agree with the suggestion given by Jeremy.
You should have a web API and Razor project separate.
Besides, if you would like to make some tests then you could refer to the articles below.
Upvotes: 1