I have class:
[AllowMultiple = true]
CustomAttribute : Attribute
When I try add more than one CustomAttribute to MetaColumn, after registering modelprovider, MetaColumn has only the last one of CustomAttributes.
It seams that somewhere the modelprovider did distinct select on the attributes types.
I global.asax in Application_Start a have following code:
MetaModel model = new MetaModel();
ContextConfiguration config = new ContextConfiguration();
config.MetadataProviderFactory =
(
type => new Microsoft.Web.DynamicData.InMemoryMetadataTypeDescriptionProvider
(
type, new System.ComponentModel.DataAnnotations.AssociatedMetadataTypeTypeDescriptionProvider(type)
)
);
My.BLL.AttributesManager.SetAttributesFromDb();
SD.LLBLGen.Pro.DynamicDataSupportClasses.LLBLGenProDataModelProvider modelProvider =
new SD.LLBLGen.Pro.DynamicDataSupportClasses.LLBLGenProDataModelProvider(
typeof(My.LLBL.EntityType),
new My.LLBL.Linq.LinqMetaData(),
new My.LLBL.FactoryClasses.ElementCreator());
model.RegisterContext(modelProvider, config);
slice from My.BLL.AttributesManager.SetAttributesFromDb
foreach (IEntityField field in entity.Fields)
{
PropertyInfo info = entity.GetType().GetProperty(field.Name);
List<Attribute> attributes = SecurityManager.GetFieldAttributes(entityType.ToString(), field.Name);
InMemoryMetadataManager.AddColumnAttributes(info, attributes.ToArray());
}
Its a very serious problem for me, because a whole DynamicData application is based on Metadata Attributes and there are many customization based on CustomAttributes
Daniel, using v2.6