Inheritance: System.Data.Objects.DataClasses.EntityObject
Esempio n. 1
0
 /// <summary>
 /// Create a new UserEntity object.
 /// </summary>
 /// <param name="userName">Initial value of the UserName property.</param>
 /// <param name="password">Initial value of the Password property.</param>
 /// <param name="authentication">Initial value of the Authentication property.</param>
 public static UserEntity CreateUserEntity(global::System.String userName, global::System.String password, global::System.String authentication)
 {
     UserEntity userEntity = new UserEntity();
     userEntity.UserName = userName;
     userEntity.Password = password;
     userEntity.Authentication = authentication;
     return userEntity;
 }
Esempio n. 2
0
 public bool AddUser(User user)
 {
     try
     {
         UserEntity ue = new UserEntity();
         ue.UserName = user.Username;
         ue.Password = user.Password;
         ue.Authentication = user.Level.ToString();
         ue.State = user.CurrentState.ToString();
         //TODO - Add friends
         ForumContext.UserEntities.AddObject(ue);
         ForumContext.SaveChanges();
         return true;
     }
     catch (Exception)
     {
         //TODO
         throw;
     }
 }
Esempio n. 3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the UserEntities EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToUserEntities(UserEntity userEntity)
 {
     base.AddObject("UserEntities", userEntity);
 }