I do have some text(template), which looks like "Hello @FirstName, Welcome to @Address". The original plan was to put this text file in a view-bag and pass it through razor and it will do the job.
Now, The problem that I am facing is that my team wants this transformation to be handled by a Service, So there is no controller and there is no view here BUT there is a need to use Razor view engine's capability to replace all @ with server variables.
This sounded weird to me as well but is there any way that I can extract this capability of Razor view in a way that I can use this functionality in a restful service rather than sending this data to a .cshtml file?