async Task<bool> _CheckIsDeleteted(UserAccountViewModel userAccountViewModel) { if (userAccountViewModel.IsDeleted) { _userCollection.Remove(userAccountViewModel); _userService.Delete(userAccountViewModel.ID); return true; } return false; }
async Task _UpdateIsEdittableStatus(UserAccountViewModel userAccountViewModel) { await TaskEx.Run( () => { if (userAccountViewModel.IsEdittable) { this._userCollection.Where(u => u.ID != userAccountViewModel.ID) .Each(user => user.IsEdittable = false); } }); }
async Task _Save(UserAccountViewModel userAccountViewModel) { await TaskEx.Run( () => { var userAccount = new UserAccount( userAccountViewModel.ID, userAccountViewModel.FirstName, userAccountViewModel.LastName, userAccountViewModel.SelectedAccessLevel); this._userService.SaveOrUpdate(userAccount); }); }