I am playing with the latest conventions code and loving it so far.
But when I tried to implement a convention for my column names to
match what my Oracle DBA tells me I must do, I run into trouble.
When I declare the following:
public class ColumnNameConvention : IPropertyConvention
{
for
certain cases, and let the convention take care of the rest. But so
far, I cannot figure out how to have an IPropertyConvention only kick
in where I am not already explicitly calling ColumnName.
On Mar 14, 9:07 am, JohnRudolfLewis johnrle...@gmail.com wrote:
I am playing with the latest
());
On Sat, Mar 14, 2009 at 4:07 PM, JohnRudolfLewis johnrle...@gmail.comwrote:
I am playing with the latest conventions code and loving it so far.
But when I tried to implement a convention for my column names to
match what my Oracle DBA tells me I must do, I run into trouble.
When
)
{
if (target.ColumnNames.List().Count == 0)
{
target.ColumnNames.Add
(target.Property.Name.ToUpperCaseUnderscore());
}
}
On Mar 14, 9:29 am, JohnRudolfLewis johnrle...@gmail.com wrote:
I forget the number, but it was from yesterday
PM, JohnRudolfLewis johnrle...@gmail.comwrote:
I got it working, but the code does not feel right. The code in my
Apply method is what really bugs me.
In my class map, I now need to do the following..
Map(x = x.Column, COLUMN_NAME)
And in my IPropertyConvention I need
Duh... Thanks.
On Mar 14, 10:17 am, James Gregory jagregory@gmail.com wrote:
What's wrong with this:
public bool Accept(IProperty target)
{
return (target.ColumnNames.List().Count == 0);
}
On Sat, Mar 14, 2009 at 5:15 PM, JohnRudolfLewis johnrle...@gmail.comwrote:
Thanks