The ConfORM architecture allows a substitution of the “mapping-elements-drive”.
In the actual implementation I’m using a class named ObjectRelationalMapper where I’m using ORM terminology:
public interface IObjectRelationalMapper
{
void TablePerClass(IEnumerable<Type> baseEntities);
void TablePerClassHierarchy(IEnumerable<Type> baseEntities);
void TablePerConcreteClass(IEnumerable<Type> baseEntities);
void TablePerClassHierarchy<TBaseEntity>() where TBaseEntity : class;
void TablePerClass<TBaseEntity>() where TBaseEntity : class;
void TablePerConcreteClass<TBaseEntity>() where TBaseEntity : class;
void Component<TComponent>();
void Complex<TComplex>();
void Poid<TEntity>(Expression<Func<TEntity, object>> propertyGetter);
void ManyToMany<TLeftEntity, TRigthEntity>();
void ManyToOne<TLeftEntity, TRigthEntity>();
void OneToOne<TLeftEntity, TRigthEntity>();
void Set<TEntity>(Expression<Func<TEntity, object>> propertyGetter);
void Bag<TEntity>(Expression<Func<TEntity, object>> propertyGetter);
void List<TEntity>(Expression<Func<TEntity, object>> propertyGetter);
void Array<TEntity>(Expression<Func<TEntity, object>> propertyGetter);
void Dictionary<TEntity>(Expression<Func<TEntity, object>> propertyGetter);
void Cascade<TFromEntity, TToEntity>(Cascade cascadeOptions);
void PersistentProperty<TEntity>(Expression<Func<TEntity, object>> propertyGetter);
}
I would read some proposal for a IDddMapper.
For example
- instead “Component” use “ValueObject”
- instead define the cascade behavior between two classes use AggregateRoot
- Add …
- …
Have you a proposal with a little explication of the expected behavior ?
What would be great is to override the default conventions. For example I would like to IEnumerable instead of List, Baf or Array. In DDD List would be a diseaster so I avoid it as possible.
ReplyDeleteOverride ?
ReplyDeleteorm.Bag(...) is not enough ?
the injection of IPatternsHolder is not enough ?
If you don't need a IList why you are using it in your classes instead a ICollection ? ;)
hmmm... to help you better I should open a Google group. perhaps...
btw... your proposal for DDD based API ?
If you select the new verbiage (ValueObject/AggregateRoot) to define the API. It would be nice to have the other words (Component, Cascade) in the VS tool tip text.
ReplyDelete@Jason
ReplyDeleteROTOLF!!
Sure... just before the first Alpha1
what? if the language is going to change than having some context as to X => Y would be helpful.
ReplyDeleteIf not the xml comments, then what about depreciated members who call the "real thing"
[Obsolete("Use ValueObject()")]
public void Component()
{
ValueObject();
}
No, Jason.
ReplyDeleteConfORM can support more than one entry point.
If you like you can use ObjectRelationalMapper.
If you like attribute you can implements a IDomainInspector based on your custom attributes.
If you like you can implements a IDomainInspector based on EF attributes.
And... we can implements a IDomainInspector but with a DDD based API.
I don't know how I can help you but I only want to tell you:
ReplyDeleteThank you very much, for your products, docs, posts... I learn something new every day