public int Create(UserState obj)
        {
            obj.Datetime = DateTime.Now;

            model.UserStates.AddObject(obj);
            return model.SaveChanges();
        }
 /// <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);
 }
 /// <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;
 }