public static Comment MapComment(dynamic comment) { var newComment = new Comment(); newComment.Id = comment.id; if (comment.from != null) { newComment.MemberId = comment.from.id; } newComment.Message = comment.message; newComment.CreatedTimeStamp = Convert.ToDateTime(comment.created_time); return newComment; }
/// <summary> /// Create a new Comment object. /// </summary> /// <param name="id">Initial value of the Id property.</param> /// <param name="message">Initial value of the Message property.</param> /// <param name="createdTimeStamp">Initial value of the CreatedTimeStamp property.</param> /// <param name="memberId">Initial value of the MemberId property.</param> /// <param name="albumId">Initial value of the AlbumId property.</param> /// <param name="pictureId">Initial value of the PictureId property.</param> public static Comment CreateComment(global::System.String id, global::System.String message, global::System.DateTime createdTimeStamp, global::System.String memberId, global::System.String albumId, global::System.String pictureId) { Comment comment = new Comment(); comment.Id = id; comment.Message = message; comment.CreatedTimeStamp = createdTimeStamp; comment.MemberId = memberId; comment.AlbumId = albumId; comment.PictureId = pictureId; return comment; }
/// <summary> /// Deprecated Method for adding a new object to the Comments EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToComments(Comment comment) { base.AddObject("Comments", comment); }