Inheritance: EntityWindow
Example #1
0
        public virtual async Task <EntityEditor> GetEditor(TEntity entity)
        {
            EntityEditor editor = new EntityEditor();

            editor.Model = await GetEditModel(entity);

            return(editor);
        }
Example #2
0
        public virtual async Task <EntityEditor> GetEditor(Guid id)
        {
            EntityEditor editor = new EntityEditor();

            editor.Model = await GetEditModel(id);

            return(editor);
        }
        public virtual EntityEditor GetEditor <TEntity>(TEntity entity) where TEntity : class, IEntity, new()
        {
            EntityMetadata metadata = EntityAnalyzer.GetMetadata <TEntity>();

            EntityEditModel <TEntity> model = new EntityEditModel <TEntity>(entity);

            model.Properties = metadata.EditProperties;
            EntityEditor editor = new EntityEditor(this);

            editor.Model = model;
            return(editor);
        }