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 }; }
public void MarkAsModified(RecruiterAccount recruiterAccount) { DbContext.Entry(recruiterAccount).State = EntityState.Modified; }
public RecruiterAccount FindRecruiterAccount(string emailAddress) { RecruiterAccount recruiter = DbContext.RecruiterAccounts.Find(emailAddress); return(recruiter); }
public void SaveNewRecruiterAccount(RecruiterAccount recruiterAccount) { DbContext.RecruiterAccounts.Add(recruiterAccount); DbContext.SaveChanges(); }