I'd suggest upgrading to RC1 if you can; otherwise, yeah that looks fine.
Automapping or fluent?

On Thu, Aug 20, 2009 at 2:35 AM, Dru Sellers <[email protected]> wrote:

> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to