Greetings all - I haven't posted here in ages I am entirely new to .Net having been working in it for a week at most so please go easy and be detailed as possible
I have the following PONO:
Private intTrackingNumber AsIntegerPrivate intDateReceived AsIntegerPrivate strManufacturer AsStringPublicProperty TrackingNumber() AsIntegerGetReturn intTrackingNumber
intTrackingNumber = value
EndSetEndPropertyPublicProperty DateReceived() AsStringGet' TODO: Convert timestamp to formatted date
' TODO: Convert formatted date to timestamp
intDateReceived = value
The issue I am faced with is how to store date/time as a timestamp (integer) but provide public properties which format/convert accordingly.
I suppose I could provide a an additional getter()/setter() but ideally I wonder if EF has a way of circumventing this "convention"?
Additionally - I am also curious as to whether it's possible to map properties to columns which are not labeled correctly?
Basically if I were working in a existing database (EF automatically builds my PONO with properties named after table fields) I wish to name the fields something more meaningful; some fields for example might be awkward abbreviations but in the object model I want something more English friendly?
I seem to recall being able to do this with Hibernate in java (actually it's PHP port) but never the less does EF support such a feature? Seems obvious that this would be useful in day to day development???