public AdministrationVM(IAdministrationServices service, IIOService ioService)
 {
     this.administrationService = service;
     this.ioService = ioService;
     this.currentArtistAdministration = new ArtistAdministrationVM(this.administrationService, ioService);
     this.currentCatagoryAdministration = new CatagoryAdministrationVM(this.administrationService);
     this.currentVenueAdministration = new VenueAdministrationVM(this.administrationService);
     this.currentPerformanceAdministration = new PerformanceAdministrationVM(this.administrationService);
     Login = new RelayCommand((c) =>
     {
         var box = c as PasswordBox;
         var password = box.Password;
         user = service.CheckUser(UserName, password);
         if(user != null)
         {
             LoggedIn = true;
             LoginFailedMessage = "";
             RaisePropertyChangedEvent(nameof(LoggedIn));
         }
         else
         {
             LoginFailedMessage = "UserId or Password is invalid";
             RaisePropertyChangedEvent(nameof(LoginFailedMessage));
         }
     });
 }
 public void TestInsert()
 {
     IDatabase db = DALFactory.CreateDatabase();
     IUserDao dao = DALFactory.CreateUserDao(db);
     User u = new User();
     u.Email = "*****@*****.**";
     u.FirstName = "Unit Test";
     u.LastName = "Unit Test";
     u.Password = "******";
     dao.Insert(u);
     PropertyInfo info = typeof(User).GetProperty("Email");
     User result = dao.findByUniqueProperty(info, "*****@*****.**");
     Assert.AreEqual(result.Email, "*****@*****.**");
 }