/// <summary>
 /// Create a new Videos object.
 /// </summary>
 /// <param name="videoId">Initial value of the VideoId property.</param>
 /// <param name="userId">Initial value of the UserId property.</param>
 /// <param name="isReminder">Initial value of the IsReminder property.</param>
 /// <param name="isSentReminder">Initial value of the IsSentReminder property.</param>
 /// <param name="isCompile">Initial value of the IsCompile property.</param>
 /// <param name="isError">Initial value of the IsError property.</param>
 /// <param name="isImage">Initial value of the IsImage property.</param>
 /// <param name="isSoundTrack">Initial value of the IsSoundTrack property.</param>
 /// <param name="isUploadToYouTube">Initial value of the IsUploadToYouTube property.</param>
 /// <param name="views">Initial value of the Views property.</param>
 public static Videos CreateVideos(global::System.String videoId, global::System.String userId, global::System.Boolean isReminder, global::System.Boolean isSentReminder, global::System.Boolean isCompile, global::System.Boolean isError, global::System.Boolean isImage, global::System.Boolean isSoundTrack, global::System.Boolean isUploadToYouTube, global::System.Int32 views)
 {
     Videos videos = new Videos();
     videos.VideoId = videoId;
     videos.UserId = userId;
     videos.IsReminder = isReminder;
     videos.IsSentReminder = isSentReminder;
     videos.IsCompile = isCompile;
     videos.IsError = isError;
     videos.IsImage = isImage;
     videos.IsSoundTrack = isSoundTrack;
     videos.IsUploadToYouTube = isUploadToYouTube;
     videos.Views = views;
     return videos;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the Videos EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToVideos(Videos videos)
 {
     base.AddObject("Videos", videos);
 }
Example #3
0
        public string RegisterUser(string uid, string email, string fullname, string accessToken)
        {
            string videoId = "";
              try
              {
            using (TimeFliesByEntities dc = new TimeFliesByEntities(Settings.EFConnectionString))
            {
              AppUser user = new AppUser();
              user.UserId = uid;
              user.Email = email;
              user.FullName = fullname;
              user.AccessToken = accessToken;
              user.LastLogin = DateTime.Now;
              user.IsActive = true;
              user.DateAdded = DateTime.Now;
              dc.AddToUser(user);

              Videos video = new Videos();

              video.VideoId = Guid.NewGuid().ToString().Substring(0, 8);
              video.UserId = user.UserId;
              video.VideoName = "My Video";
              video.Publish = "PublicFriends";
              video.IsReminder = true;
              video.IsSentReminder = false;
              video.IsCompile = false;
              video.IsImage = false;
              video.IsError = false;
              video.IsSoundTrack = false;
              video.ServerReminderTime = DateTime.Now;
              video.DateAdded = DateTime.Now;
              dc.AddToVideos(video);

              videoId = video.VideoId;
              EmailService.NewUserRegister(user, videoId);
            }
              }
              catch (Exception ex)
              {
            EmailService.ErrorEmail(ex);
            videoId = ex.Message;
              }
              return videoId;
        }