Inheritance: System.Data.Objects.DataClasses.EntityObject
Ejemplo 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;
 }
Ejemplo 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;
     }
 }
Ejemplo 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);
 }