Property definition

6 views
Skip to first unread message

Rodrigo Juarez

unread,
Apr 15, 2010, 4:46:37 PM4/15/10
to ConfORM
Hi

Sorry for my english

How do you set string length, or other values, like unique index or
not null, with ConfORM?

Thanks in advance

Rodrigo

Diego Mijelshon

unread,
Apr 15, 2010, 8:12:26 PM4/15/10
to codec...@googlegroups.com
Example:

  mapper.Customize<Foo>(pcc => pcc.Property(x => x.FooProp,
                                            pm =>
                                            {
                                              pm.Length(20);
                                              pm.NotNullable(true);
                                              pm.UniqueKey("IX_FooProp");
                                            }));

This is just for one class and one property... but you can use AddPropertyPattern to set those values bases on conventions.

    Diego




--
To unsubscribe, reply using "remove me" as the subject.

Rodrigo Juarez

unread,
Apr 15, 2010, 8:59:31 PM4/15/10
to codec...@googlegroups.com
Thanks a lot!

2010/4/15 Diego Mijelshon <di...@mijelshon.com.ar>:
--
Rodrigo Juarez
-----------------------------------------------
Blog: http://rodrigojuarez.com.ar
Web: http://intap.com.ar

Fabio Maulo

unread,
Apr 15, 2010, 11:53:23 PM4/15/10
to codec...@googlegroups.com
Note:
mapper.Customize<T> is the generic version of customizers.

2010/4/15 Rodrigo Juarez <rodrigo...@gmail.com>



--
Fabio Maulo

Reply all
Reply to author
Forward
0 new messages