I need to render my razor view to string. I would like to pass my model:
public class ContactDetails
{
public string Name { get; set; }
public string Lastname { get; set; }
public string Email { get; set; }
}
and use it in my razor view and then render it to the string.
I heard about RazorEngine but I would like to do it without it. Also I don't have an controller context.
Maybe I need fake some controller context?
Is it possible to do it? Do you have any idea how can to solve this problem?