Пример #1
0
        /// <summary>
        /// Create a new userhunt object.
        /// </summary>
        /// <param name="userHuntId">Initial value of the UserHuntId property.</param>
        /// <param name="userId">Initial value of the UserId property.</param>
        /// <param name="huntId">Initial value of the HuntId property.</param>
        /// <param name="userRoleId">Initial value of the UserRoleId property.</param>
        public static userhunt Createuserhunt(global::System.Int64 userHuntId, global::System.Int64 userId, global::System.Int64 huntId, global::System.Int64 userRoleId)
        {
            userhunt userhunt = new userhunt();

            userhunt.UserHuntId = userHuntId;
            userhunt.UserId     = userId;
            userhunt.HuntId     = huntId;
            userhunt.UserRoleId = userRoleId;
            return(userhunt);
        }
Пример #2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the userhunts EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTouserhunts(userhunt userhunt)
 {
     base.AddObject("userhunts", userhunt);
 }
 /// <summary>
 /// Create a new userhunt object.
 /// </summary>
 /// <param name="userHuntId">Initial value of the UserHuntId property.</param>
 /// <param name="userId">Initial value of the UserId property.</param>
 /// <param name="huntId">Initial value of the HuntId property.</param>
 public static userhunt Createuserhunt(global::System.Int64 userHuntId, global::System.Int64 userId, global::System.Int64 huntId)
 {
     userhunt userhunt = new userhunt();
     userhunt.UserHuntId = userHuntId;
     userhunt.UserId = userId;
     userhunt.HuntId = huntId;
     return userhunt;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the userhunts EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTouserhunts(userhunt userhunt)
 {
     base.AddObject("userhunts", userhunt);
 }
 /// <summary>
 /// Method that saves userhunt data in the 'userhunts' table.
 /// </summary>
 /// <param name="userHunt"></param>
 public void SaveUserHunt(userhunt userHunt)
 {
     using (var context = new TreasureHuntEntities())
     {
         context.userhunts.AddObject(userHunt);
         context.SaveChanges();
         context.ObjectStateManager.ChangeObjectState(userHunt, System.Data.EntityState.Added);
     }
 }