private void RemoveProfiles(Account account) { account.Profiles.Clear(); foreach (var profile in ObjectFactory.GetInstance<IProfilePersister>().GetAll(account.Name).ToList()) { account.Profiles.Remove(profile); } }
public Account Add(AccountName accountName) { using (var context = CreateDataContext()) { var newAccount = new Account {Name = accountName.Value}; var plugin = context.Plugins.Single(x => x.Name == _pluginName); plugin.Accounts.Add(newAccount); context.SubmitChanges(); return newAccount; } }
public Account Add(AccountName accountName) { var account = new Account {Name = accountName.Value}; _accounts.Add(account); return account; }
private void LoadProfiles(Account account) { account.Profiles.Clear(); account.Profiles.AddRange(ObjectFactory.GetInstance<IProfilePersister>().GetAll(account.Name)); }
private void detach_Accounts(Account entity) { this.SendPropertyChanging(); entity.Plugin = null; }
private void attach_Accounts(Account entity) { this.SendPropertyChanging(); entity.Plugin = this; }
partial void DeleteAccount(Account instance);
partial void UpdateAccount(Account instance);
partial void InsertAccount(Account instance);
private AccountDomainObject CreateAccount(Account account) { return CreateAccount(account.Name, account.Profiles); }