public bool SaveChanges()
        {
            if (_isNewEntity)
            {
                if (Validate(CrudAction.Create))
                {
                    _crudEntityEditor.AcceptChanges();
                    _dataSource.Create(_crudEntityEditor.GetEntityWithChanges());
                    UserAction          = CrudAction.Create;
                    RequiresGridRefresh = true;
                    return(true);
                }
            }
            else
            {
                if (Validate(CrudAction.Update))
                {
                    _crudEntityEditor.AcceptChanges();
                    _dataSource.Update(_crudEntityEditor.GetEntityWithChanges());
                    UserAction          = CrudAction.Update;
                    RequiresGridRefresh = true;
                    return(true);
                }
            }

            RequiresGridRefresh = false;
            return(false);
        }
 public void Create(object entity)
 {
     _adaptee.Create((TEntity)entity);
 }