本文整理汇总了C#中Link.Save方法的典型用法代码示例。如果您正苦于以下问题:C# Link.Save方法的具体用法?C# Link.Save怎么用?C# Link.Save使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Link
的用法示例。
在下文中一共展示了Link.Save方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Link
/// <summary>
/// Create a new link with a name
/// </summary>
/// <param name="name">The initial name of the link</param>
/// <param name="asset">The asset this link belongs to</param>
/// <param name="url">The URL of the link</param>
/// <param name="onMenu">True to show on the asset's detail page menu</param>
/// <param name="attributes">Required attributes.</param>
/// <returns>A newly minted Link that exists in the VersionOne system.</returns>
public Link Link(string name, BaseAsset asset, string url, bool onMenu,
IDictionary<string, object> attributes) {
var link = new Link(instance) {
Asset = asset,
Name = name,
URL = url,
OnMenu = onMenu
};
AddAttributes(link, attributes);
link.Save();
return link;
}
示例2: Insert
public void Insert(string Url,string Title,string Description,string URLRewrite,int Lang,string Tags,DateTime DatePosted,int Poster,int ViewsCount,int HitCount,bool Display,string Thumbnail)
{
Link item = new Link();
item.Url = Url;
item.Title = Title;
item.Description = Description;
item.URLRewrite = URLRewrite;
item.Lang = Lang;
item.Tags = Tags;
item.DatePosted = DatePosted;
item.Poster = Poster;
item.ViewsCount = ViewsCount;
item.HitCount = HitCount;
item.Display = Display;
item.Thumbnail = Thumbnail;
item.Save(UserName);
}