Using DataAnnotations, I set my string properties with the length
using StringLength
attribute

[StringLength(10)]
public virtual string Identificacao { get; set; }

For this convection is applied to my database, I created a
StringLengthConventions see: http://chopapp.com/#jlu7vz5v

Now I need to configure the properties as NotNull then follow the same
steps:

1. I added the attribute [Required] on properties.
2. Create a RequiredConvention attribute, see: http://chopapp.com/#4milknwk

*Error*

As you may have noticed, the conventions retrieve only the first attribute.
What generates an error in the generated schema.
The schema will follow the convention only the first attribute!

*Question*

The first step to fix the error is to create a test that fails. The
question is, how to create a test for conventions?

Thanks,

Riderman de Sousa Barbosa <http://about.me/ridermansb>

Web Developer | MCPD Certify

Skype.: 4042-6002 | Cel.: (31) 8681-1986
bindsolution.com

Microsoft Parner Network

-- 
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fluent-nhibernate+unsubscr...@googlegroups.com.
To post to this group, send email to fluent-nhibernate@googlegroups.com.
Visit this group at http://groups.google.com/group/fluent-nhibernate?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to