public static LinkViewModel GetYoutube(Link model) { return(new LinkViewModel { Id = model.Id, Action = model.Action == "Index" ? string.Empty : model.Action, Controller = model.Controller, Order = model.Order, Name = model.Name, Link = model.Url, YoutubeId = HtmlUtils.GetYoutubeId(model.Url), IconName = model.IconName, Category = model.Category }); }