コード例 #1
0
        public int Create(UserState obj)
        {
            obj.Datetime = DateTime.Now;

            model.UserStates.AddObject(obj);
            return model.SaveChanges();
        }
コード例 #2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the UserStates EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToUserStates(UserState userState)
 {
     base.AddObject("UserStates", userState);
 }
コード例 #3
0
 /// <summary>
 /// Create a new UserState object.
 /// </summary>
 /// <param name="sID">Initial value of the SID property.</param>
 public static UserState CreateUserState(global::System.Int32 sID)
 {
     UserState userState = new UserState();
     userState.SID = sID;
     return userState;
 }