public void Seed() { var role1 = _session.Query<Role>().First(x => x.Name == "Admin"); var role2 = _session.Query<Role>().First(x => x.Name == "User"); var account = new Account{ Name = "Carlos Rosales", Email = "*****@*****.**", Password = "******", Genre = "Male", Age = 20, Active = true, Role = role1 }; _session.Save(account); var account2 = new Account { Name = "Eduardo", Email = "*****@*****.**", Password = "******", Genre = "Male", Age = 22, Active = true }; account2.Role = role2; _session.Save(account2); }
public EmailResult VerificationEmail(Account model) { To.Add(model.Email); From = "*****@*****.**"; Subject = "Welcome to MiniAmazon!"; return Email("VerificationEmail", model); }
public void Seed() { var account = new Account { Name = "Carlos", Email = "*****@*****.**", Password = "******" }; _session.Save(account); }
public void Seed() { var role1 = _session.Query<Role>().First(x => x.Name == "Admin"); var role2 = _session.Query<Role>().First(x => x.Name == "Patito"); var account = new Account { Name = "Camilo", Email = "*****@*****.**", Password = "******", }; _session.Save(account); account.AddRole(role1); account.AddRole(role2); _session.Update(account); }
public void DefineAccount(Account account, IEnumerable<Sale> _Sales) { Account = account; SetSaleData(_Sales); }
public UserGeneralModel(Account account) { DefineAccount(account, Account.Sales); }