public void AddClientToGroup(Group group)
        {
            using (IDataContextWrapper dataContext = _dataContextLocator())
                if (dataContext.Table<Client>().Where(c => c.GroupId == null).Count() == 0)
                {
                    MessageBox.Show("There are no clients without a group.");
                    return;
                }

            _navigationService.UriFor<GroupAddClientViewModel>().WithParam(g => g.GroupId, group.Id).Navigate();
        }
        public void DeleteGroup(Group group)
        {
            using (IDataContextWrapper dataContext = _dataContextLocator())
            {
                Group groupRecord = dataContext.Table<Group>().FirstOrDefault(x => x.Id == group.Id);
                dataContext.DeleteOnSubmit(groupRecord);
                dataContext.Table<Client>().Apply(x => { if (x.GroupId == group.Id) x.Group = null; });
                dataContext.SubmitChanges();
            }

            Groups.Remove(group);
        }