/// <summary> /// Deprecated Method for adding a new object to the UsersPaymentSystems EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToUsersPaymentSystems(UsersPaymentSystems usersPaymentSystems) { base.AddObject("UsersPaymentSystems", usersPaymentSystems); }
public static void SaveWebMoneyWallet(string userName, string walletID) { var doExist = GetWebMoneyWallet(userName); if(!string.IsNullOrEmpty(doExist)) { var paymentItem = EntitiesContainer.UsersPaymentSystems.Where(u => u.aspnet_Users.UserName == userName).First(); paymentItem.AccountID = walletID; EntitiesContainer.SaveChanges(); } else { var paymentItemNew = new UsersPaymentSystems(); var userID = EntitiesContainer.aspnet_Users.Where(u => u.UserName == userName).First().UserId; paymentItemNew.AccountID = walletID; paymentItemNew.userID = userID; paymentItemNew.PaymentSystemID = 1; // web money EntitiesContainer.UsersPaymentSystems.AddObject(paymentItemNew); EntitiesContainer.SaveChanges(); } }
/// <summary> /// Create a new UsersPaymentSystems object. /// </summary> /// <param name="id">Initial value of the ID property.</param> /// <param name="paymentSystemID">Initial value of the PaymentSystemID property.</param> /// <param name="accountID">Initial value of the AccountID property.</param> public static UsersPaymentSystems CreateUsersPaymentSystems(global::System.Int64 id, global::System.Int64 paymentSystemID, global::System.String accountID) { UsersPaymentSystems usersPaymentSystems = new UsersPaymentSystems(); usersPaymentSystems.ID = id; usersPaymentSystems.PaymentSystemID = paymentSystemID; usersPaymentSystems.AccountID = accountID; return usersPaymentSystems; }