Click here to Skip to main content
13,553,325 members

.NET Framework

 
GeneralRe: winRT xaml/C# listview selected index Pin
Marco Bertschi18-Feb-13 23:18
memberMarco Bertschi18-Feb-13 23:18 
GeneralRe: winRT xaml/C# listview selected index Pin
Clodetta del Mar19-Feb-13 0:40
memberClodetta del Mar19-Feb-13 0:40 
GeneralRe: winRT xaml/C# listview selected index Pin
Marco Bertschi19-Feb-13 1:03
memberMarco Bertschi19-Feb-13 1:03 
AnswerRe: winRT xaml/C# listview selected index [solved] Pin
Clodetta del Mar18-Feb-13 23:09
memberClodetta del Mar18-Feb-13 23:09 
QuestionReplacing Compiled Code for Scheduled Tasks Pin
indian14313-Feb-13 10:57
memberindian14313-Feb-13 10:57 
AnswerRe: Replacing Compiled Code for Scheduled Tasks Pin
Jibesh13-Feb-13 11:07
memberJibesh13-Feb-13 11:07 
AnswerRe: Replacing Compiled Code for Scheduled Tasks Pin
Dave Kreskowiak13-Feb-13 16:50
mvpDave Kreskowiak13-Feb-13 16:50 
QuestionEntity Framework mapping issue Pin
alex.barylski13-Feb-13 6:32
memberalex.barylski13-Feb-13 6:32 
Greetings all - I haven't posted here in ages Smile | :) 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 Smile | :)

I have the following PONO:

Public Class WorkOrderEntity

    Private intTrackingNumber As Integer
    Private intDateReceived As Integer
    Private strManufacturer As String

    Public Property TrackingNumber() As Integer
        Get
            Return intTrackingNumber
        End Get

        Set(value As Integer)
            intTrackingNumber = value
        End Set
    End Property

    Public Property DateReceived() As String
        Get
            ' TODO: Convert timestamp to formatted date
            Return intDateReceived
        End Get

        Set(value As String)
            ' TODO: Convert formatted date to timestamp
            intDateReceived = value
        End Set
    End Property

End Class


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???

Any ideas?

Regards,
Alex
AnswerRe: Entity Framework mapping issue Pin
Richard Deeming13-Feb-13 8:23
memberRichard Deeming13-Feb-13 8:23 
GeneralRe: Entity Framework mapping issue Pin
alex.barylski13-Feb-13 8:45
memberalex.barylski13-Feb-13 8:45 
GeneralRe: Entity Framework mapping issue Pin
Richard Deeming13-Feb-13 9:05
memberRichard Deeming13-Feb-13 9:05 
GeneralRe: Entity Framework mapping issue Pin
Dave Kreskowiak13-Feb-13 16:55
mvpDave Kreskowiak13-Feb-13 16:55 
QuestionProblem with my Kinect Runtime in running mode :( Pin
Yanni de Wouters9-Feb-13 11:59
memberYanni de Wouters9-Feb-13 11:59 
AnswerRe: Problem with my Kinect Runtime in running mode :( Pin
Richard MacCutchan9-Feb-13 21:33
mvpRichard MacCutchan9-Feb-13 21:33 
GeneralRe: Problem with my Kinect Runtime in running mode :( Pin
Yanni de Wouters10-Feb-13 10:19
memberYanni de Wouters10-Feb-13 10:19 
GeneralRe: Problem with my Kinect Runtime in running mode :( Pin
Richard MacCutchan10-Feb-13 21:39
mvpRichard MacCutchan10-Feb-13 21:39 
GeneralRe: Problem with my Kinect Runtime in running mode :( Pin
Yanni de Wouters7-Apr-13 5:32
memberYanni de Wouters7-Apr-13 5:32 
QuestionMemory managment Pin
imgags8-Feb-13 2:27
memberimgags8-Feb-13 2:27 
AnswerRe: Memory managment Pin
Dave Kreskowiak8-Feb-13 2:47
mvpDave Kreskowiak8-Feb-13 2:47 
AnswerRe: Memory managment Pin
Eddy Vluggen9-Feb-13 0:21
mvpEddy Vluggen9-Feb-13 0:21 
QuestionWhy dont call event Pin
Junoli7-Feb-13 0:55
memberJunoli7-Feb-13 0:55 
AnswerRe: Why dont call event Pin
Eddy Vluggen7-Feb-13 9:00
mvpEddy Vluggen7-Feb-13 9:00 
QuestionChange Collpased Text Color Settings in VB.Net Pin
AmbiguousName6-Feb-13 23:46
memberAmbiguousName6-Feb-13 23:46 
AnswerRe: Change Collpased Text Color Settings in VB.Net Pin
Richard MacCutchan7-Feb-13 0:52
mvpRichard MacCutchan7-Feb-13 0:52 
GeneralRe: Change Collpased Text Color Settings in VB.Net Pin
AmbiguousName7-Feb-13 1:12
memberAmbiguousName7-Feb-13 1:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy |
Web01-2016 | 2.8.180515.1 | Last Updated 2 May 2018
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid