static void DeleteAllAccounts() { var coll = new AccountInfoCollection(); coll.LoadAll(); coll.MarkAllAsDeleted(); coll.Save(); }
static void AddAccount(AccountInfo account) { var coll = new AccountInfoCollection(); AccountInfo emp = coll.AddNew(); emp.Name = account.Name; emp.Id = account.Id; emp.Address = account.Address; emp.Age = account.Age; coll.Save(); }
static void DeleteAccount(Guid id) { var accountColl = new AccountInfoCollection(); accountColl.LoadAll(); AccountInfo emp = accountColl.FindByPrimaryKey(id); if (emp != null) { emp.MarkAsDeleted(); accountColl.Save(); } }