Ejemplo n.º 1
0
        private static Picture MapPicture(dynamic picture)
        {
            var newPicture = new Picture();

            newPicture.Id = picture.id;
            newPicture.Description = picture.name ?? string.Empty;
            newPicture.FBLink = picture.link;
            newPicture.SourceUrl = picture.picture;
            newPicture.Height = Convert.ToInt32(picture.height);
            newPicture.Width = Convert.ToInt32(picture.width);

            newPicture.CreatedTimeStamp = Convert.ToDateTime(picture.created_time);
            newPicture.UpdatedTimeStamp = Convert.ToDateTime(picture.updated_time);

            return newPicture;
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Pictures EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToPictures(Picture picture)
 {
     base.AddObject("Pictures", picture);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Create a new Picture object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="sourceUrl">Initial value of the SourceUrl property.</param>
 /// <param name="height">Initial value of the Height property.</param>
 /// <param name="width">Initial value of the Width property.</param>
 /// <param name="fBLink">Initial value of the FBLink property.</param>
 /// <param name="createdTimeStamp">Initial value of the CreatedTimeStamp property.</param>
 /// <param name="updatedTimeStamp">Initial value of the UpdatedTimeStamp property.</param>
 /// <param name="albumId">Initial value of the AlbumId property.</param>
 public static Picture CreatePicture(global::System.String id, global::System.String sourceUrl, global::System.Int32 height, global::System.Int32 width, global::System.String fBLink, global::System.DateTime createdTimeStamp, global::System.DateTime updatedTimeStamp, global::System.String albumId)
 {
     Picture picture = new Picture();
     picture.Id = id;
     picture.SourceUrl = sourceUrl;
     picture.Height = height;
     picture.Width = width;
     picture.FBLink = fBLink;
     picture.CreatedTimeStamp = createdTimeStamp;
     picture.UpdatedTimeStamp = updatedTimeStamp;
     picture.AlbumId = albumId;
     return picture;
 }