/// <summary> /// Create a new administrator account /// </summary> /// <param name="username">The username for the new account</param> /// <param name="password">The password for the new account</param> /// <param name="email">The email for the new account</param> /// <returns>The newly created administrator account</returns> public Administrator CreateAdministrator(string username, string password, string email) { using (MediathekEntities context = new MediathekEntities()) { var admin = new Administrator(); admin.Username = username; admin.Password = password; admin.Email = email; context.AddToAdministrators(admin); context.SaveChanges(); return admin; } }