public static Content GetFromContentModel(ContentModel contentModel) { var content = new Content() { ContentId = contentModel.ContentId, Font = contentModel.Font, FontColor = contentModel.FontColor, FontSize = Int32.Parse(contentModel.FontSize), FontStyle = contentModel.FontStyle, Text = contentModel.Text }; return content; }
public static ContentModel CreateFromContent(Content content) { var contentModel = new ContentModel(); contentModel.Font = content.Font; contentModel.FontColor = content.FontColor; contentModel.FontSize = content.FontSize.ToString(); contentModel.FontStyle = content.FontStyle; contentModel.Text = content.Text; contentModel.ContentId = content.ContentId; return contentModel; }
/// <summary> /// Create a new Content object. /// </summary> /// <param name="contentId">Initial value of the ContentId property.</param> /// <param name="text">Initial value of the Text property.</param> /// <param name="font">Initial value of the Font property.</param> /// <param name="fontSize">Initial value of the FontSize property.</param> /// <param name="fontColor">Initial value of the FontColor property.</param> /// <param name="fontStyle">Initial value of the FontStyle property.</param> public static Content CreateContent(global::System.Guid contentId, global::System.String text, global::System.String font, global::System.Int32 fontSize, global::System.String fontColor, global::System.String fontStyle) { Content content = new Content(); content.ContentId = contentId; content.Text = text; content.Font = font; content.FontSize = fontSize; content.FontColor = fontColor; content.FontStyle = fontStyle; return content; }
/// <summary> /// Deprecated Method for adding a new object to the Contents EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToContents(Content content) { base.AddObject("Contents", content); }