/// <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; }
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; } }
/// <summary> /// Deprecated Method for adding a new object to the UserEntities EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToUserEntities(UserEntity userEntity) { base.AddObject("UserEntities", userEntity); }