/// <summary> /// Save the specified Task objedct including its encryption key, but not it's logentries. /// </summary> /// <param name='t'> /// T. /// </param> public Task Save(Task t) { using (dbc = DAL.Instance.GetDb()){ Password keyP = PasswordManager.Add(new Password { Value = t.EncryptionKey }); t.EncryptionKeyId = keyP.Id; t.Id = IdManager.GetId(); //bs.Generation = 0; dbc.Insert(t); } return(t); }