For very simple scenarios or when you have full control over your models, MVC (Model, View, Controller) is a good template.
In my experience, you usually need additional information that is important for your views, but not for your real model. For example, a list of drop-down elements that will be displayed for a model property, or in your case, to place the base URL for the site for your users.
In this case, I like to adapt MVC to VM-VC ( ViewModel , View, Controller).
Essentially, you would like to create a ViewModel bookmark and use it when rendering your views:
BookmarkViewModel.cs:
public class BookmarkViewModel { public string BaseUrl {get;set;}
You can either add your base URL directly to your view model, or create a view model yourself, or you can do this in your controller when creating the view model.
source share