/// <summary>
 /// Append attribute to base item when it is loaded
 /// </summary>
 /// <param name="item">Base item about to be persisted to datastore</param>
 public void OnItemUpdate(Item item)
 {
     if (item.HasData <AccountData>())
     {
         var data = item.GetData <AccountData>();
         if (data.Id == Guid.Empty)
         {
             OnItemCreate(item);
         }
         else
         {
             AccountDataRepo.Update(data);
         }
     }
     //else if (AccountDataRepo.Read(item) is AccountData data)
     //{
     //    AccountDataRepo.Delete(data);
     //}
 }
 /// <summary>
 /// Update existing account
 /// </summary>
 /// <param name="accountData">AccountData containing updated properties</param>
 /// <returns></returns>
 public AccountData Update(AccountData accountData)
 {
     accountData.Password = BCrypt.Net.BCrypt.HashPassword(accountData.Password);
     AccountDataRepo.Update(accountData);
     return(accountData);
 }