예제 #1
0
 /// <summary>
 /// Setups the specified entity.
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="entity">The entity.</param>
 /// <param name="entityType">Type of the entity.</param>
 /// <returns></returns>
 public static T Setup <T>(this T entity, IEntityTypeDefinition entityType) where T : class, ITypedEntity, new()
 {
     entity.Setup();
     entity.EntityType = entityType;
     //TODO: How to make entity type attributes to entity attributes
     return(entity);
 }
예제 #2
0
 public MetadataParser(
     [Import(AllowDefault = true)] IEntityTypeDefinition <TEntity> metadataDefinition)
 {
     this.metadataDefinition = metadataDefinition;
     this.metadata           = new Lazy <EntityTypeMetadata>(this.ParseMetadata);
 }