// Create New Administrator. public void CreateNewAdmin(LoginToken <Administrator> token, Administrator admin) { if (UserIsValid(token)) { _adminDAO.Add(admin); } }
// Create New Administrator. public long CreateNewAdmin(LoginToken <Administrator> token, Administrator admin) { long newId = 0; if (UserIsValid(token)) { newId = _adminDAO.Add(admin); } return(newId); }
public void Add() { administratorDAO.Add(new Administrator("USERNAME", "PASSWORD")); Assert.AreEqual(1, administratorDAO.GetAll().Count); }