public UserAccountService(IOptions <AppSettings> appSettings) { var userAccountsDataPath = Path.Combine(AssemblyUtils.AssemblyDirectory, @"Data\UserAccounts.json"); UserAccounts = UserDataMock.GetUserAccountsWithAutoIncrement(userAccountsDataPath).ToList(); AppSettings = appSettings.Value; }
public void Configure(EntityTypeBuilder <User> builder) { var usersDataPath = Path.Combine(AssemblyUtils.AssemblyDirectory, @"Data\Users.json"); var users = UserDataMock.GetUsersWithAutoIncrement(usersDataPath); builder.HasData(users.ToArray()); }
private static void AddTestData(RepositoryContext context) { var usersDataPath = Path.Combine(AssemblyUtils.AssemblyDirectory, @"Data\Users.json"); var users = UserDataMock.GetUsersWithAutoIncrement(usersDataPath); foreach (var user in users) { context.Users.AddRange(user); context.SaveChanges(); } }
public PasswordHashTest() { var userAccountsDataPath = Path.Combine(AssemblyUtils.AssemblyDirectory, @"Sample\Data\UserAccounts.json"); UserAccounts = UserDataMock.GetUserAccountsWithAutoIncrement(userAccountsDataPath).ToList(); }
public UserTest() { var usersDataPath = Path.Combine(AssemblyUtils.AssemblyDirectory, @"Sample\Data\Users.json"); Users = UserDataMock.GetUsersWithAutoIncrement(usersDataPath).ToList(); }