I want to have a property like:

private DateTime *_tweetUtcDate*;
> public DateTime *TweetDate*
> {
>     get
>     {
>         return _tweetUtcDate.ToLocalTime();
>     }
>     set
>     {
>         _tweetUtcDate = value.ToUniversalTime();
>     }
> }
>

I do this in order to do the UTC change as you see in the getter/setter.
That's why I want to keep the field name like this.

I can easily map only the field like:

<property access="field" name="_tweetUtcDate" type="System.DateTime">
>   <column name="TweetUtcDate" sql-type="smalldatetime" not-null="true" />
> </property>
>

But I still want to use the property "TweetDate" in queries, you know, like
when I call LINQ queries, I want to be able to include the property name in
select/where/orderby, etc..

Again, I could use something like "field.camelcase-underscore", but, again,
I want to keep the naming to express the use.

So, is that doable? Can I use a backing field with a specific field name,
not following specific naming convention?

* * Or is there a better way to achieve this easily ?

Regards,
--
Mohamed Meligy
Senior Developer, Team Lead Backup (.Net Technologies - TDG - Applications)
Injazat Data Systems
P.O. Box: 8230 Abu Dhabi, UAE.

Phone:  +971 2 6992700
Direct:   +971 2 4045385
Mobile:  +971 50 2623624, +971 55 2017 621

E-mail: [email protected]
Weblog: http://gurustop.net

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" 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/nhusers?hl=en.

Reply via email to