public static void InitUserStoreageService(IUserStorageService userStorageService) { foreach (var user in Users) { userStorageService.Add(user); } }
/// <summary> /// Runs a sequence of actions on an instance of the <see cref="UserStorageServiceBase"/> class. /// </summary> public void Run() { _userStorageService.Add(new User { FirstName = "Alex", LastName = "Black", Age = 25 }); //// _userStorageService.Remove(); //// _userStorageService.Search(); }
/// <summary> /// Runs a sequence of actions on an instance of the <see cref="UserStorageService"/> class. /// </summary> public void Run() { userRepositoryManager.Start(); userStorageService.Add(new User { FirstName = "Alex", LastName = "Black", Age = 25 }); userRepositoryManager.Stop(); userRepositoryManager.Start(); userStorageService.Remove((u) => u.FirstName == "Bill"); userRepositoryManager.Stop(); userRepositoryManager.Start(); userStorageService.Search((u) => u.FirstName == "Alex"); userRepositoryManager.Stop(); }