I've done quite a lot of research on this topic but can't seem to find an answer.

I have written an ASP.Net Core 2 Web API. I am now wanting to develop a front end. I have been looking at using ASP.Net Core 2 Web App using razor, however I am struggling to call my web API. All the ASP.NET guides seem to include database access in the web apps controller rather than calling an external web api.

I have seen some example of using a HTTP client in the Razor controller to call the web API but I'm not sure if this is best practice.

My end goal is to have two applications a web api and a web app. I don't mind learning new technologies but I have started using Razor as it seems quite simple.

I have also thought about following the ASP.NET Core guides and not have an API but this doesn't seem like best practice either.