예제 #1
0
        public void DeleteRecruiterAccount(string emailAddress)
        {
            RecruiterAccount userToDelete = FindRecruiterAccount(emailAddress);

            DbContext.RecruiterAccounts.Remove(userToDelete);
            DbContext.SaveChanges();
        }
        public void TestSaveRecruiter()
        {
            RecruiterAccountRepository.SaveNewRecruiterAccount(NewRecruiterAccount);
            RecruiterAccount savedAccount = RecruiterAccountRepository.FindRecruiterAccount(TestEmailAddress);

            Assert.NotNull(savedAccount);
        }
 public RecruiterAccountRepositoryTests()
 {
     RecruiterAccountRepository = new RecruiterAccountRepository(DissertationContext);
     NewRecruiterAccount        = new RecruiterAccount {
         EmailAddress   = TestEmailAddress,
         Password       = "******",
         FirstName      = "John",
         LastName       = "Doe",
         OrganisationId = 101100
     };
 }
예제 #4
0
 public void MarkAsModified(RecruiterAccount recruiterAccount)
 {
     DbContext.Entry(recruiterAccount).State = EntityState.Modified;
 }
예제 #5
0
        public RecruiterAccount FindRecruiterAccount(string emailAddress)
        {
            RecruiterAccount recruiter = DbContext.RecruiterAccounts.Find(emailAddress);

            return(recruiter);
        }
예제 #6
0
 public void SaveNewRecruiterAccount(RecruiterAccount recruiterAccount)
 {
     DbContext.RecruiterAccounts.Add(recruiterAccount);
     DbContext.SaveChanges();
 }