i want to do something like this. is this right?
*public* *class* *ComponentPropertyConvention* :
*IPropertyConvention*
{
*public* *bool* *Accept*(*IProperty* *target*)
{
*var* *et* = *target.EntityType*;
*var* *result* = *false*;
*if* (*et* != *null*)
*result* = *target.EntityType.Equals*(*typeof*(*
IndividualInfo*)) ||
*target.EntityType.Equals*(*typeof*(*CompanyInfo*))
||
*target.EntityType.Equals*(*typeof*(*Address*));
*return* *result*;
}
*public* *void* *Apply*(*IProperty* *target*)
{
*var* *name* = *string*.Format(*"{0}_{1}"*, *
target.EntityType.Name*, *target.Property.Name*);
*target.ColumnNames.Add*(*name*);
}
}
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Fluent NHibernate" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/fluent-nhibernate?hl=en
-~----------~----~----~----~------~----~------~--~---