Click here to Skip to main content
15,887,214 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: winRT xaml/C# listview selected index Pin
Marco Bertschi18-Feb-13 23:18
protectorMarco Bertschi18-Feb-13 23:18 
GeneralRe: winRT xaml/C# listview selected index Pin
Clodetta del Mar19-Feb-13 0:40
Clodetta del Mar19-Feb-13 0:40 
GeneralRe: winRT xaml/C# listview selected index Pin
Marco Bertschi19-Feb-13 1:03
protectorMarco Bertschi19-Feb-13 1:03 
AnswerRe: winRT xaml/C# listview selected index [solved] Pin
Clodetta del Mar18-Feb-13 23:09
Clodetta del Mar18-Feb-13 23:09 
QuestionReplacing Compiled Code for Scheduled Tasks Pin
indian14313-Feb-13 10:57
indian14313-Feb-13 10:57 
AnswerRe: Replacing Compiled Code for Scheduled Tasks Pin
Jibesh13-Feb-13 11:07
professionalJibesh13-Feb-13 11:07 
AnswerRe: Replacing Compiled Code for Scheduled Tasks Pin
Dave Kreskowiak13-Feb-13 16:50
mveDave Kreskowiak13-Feb-13 16:50 
QuestionEntity Framework mapping issue Pin
alex.barylski13-Feb-13 6:32
alex.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:

VB
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
mveRichard Deeming13-Feb-13 8:23 
GeneralRe: Entity Framework mapping issue Pin
alex.barylski13-Feb-13 8:45
alex.barylski13-Feb-13 8:45 
GeneralRe: Entity Framework mapping issue Pin
Richard Deeming13-Feb-13 9:05
mveRichard Deeming13-Feb-13 9:05 
GeneralRe: Entity Framework mapping issue Pin
Dave Kreskowiak13-Feb-13 16:55
mveDave Kreskowiak13-Feb-13 16:55 
QuestionProblem with my Kinect Runtime in running mode :( Pin
Yanni de Wouters9-Feb-13 11:59
Yanni de Wouters9-Feb-13 11:59 
AnswerRe: Problem with my Kinect Runtime in running mode :( Pin
Richard MacCutchan9-Feb-13 21:33
mveRichard MacCutchan9-Feb-13 21:33 
GeneralRe: Problem with my Kinect Runtime in running mode :( Pin
Yanni de Wouters10-Feb-13 10:19
Yanni de Wouters10-Feb-13 10:19 
GeneralRe: Problem with my Kinect Runtime in running mode :( Pin
Richard MacCutchan10-Feb-13 21:39
mveRichard MacCutchan10-Feb-13 21:39 
GeneralRe: Problem with my Kinect Runtime in running mode :( Pin
Yanni de Wouters7-Apr-13 5:32
Yanni de Wouters7-Apr-13 5:32 
QuestionMemory managment Pin
imgags8-Feb-13 2:27
imgags8-Feb-13 2:27 
AnswerRe: Memory managment Pin
Dave Kreskowiak8-Feb-13 2:47
mveDave Kreskowiak8-Feb-13 2:47 
AnswerRe: Memory managment Pin
Eddy Vluggen9-Feb-13 0:21
professionalEddy Vluggen9-Feb-13 0:21 
QuestionWhy dont call event Pin
Junoli7-Feb-13 0:55
Junoli7-Feb-13 0:55 
AnswerRe: Why dont call event Pin
Eddy Vluggen7-Feb-13 9:00
professionalEddy Vluggen7-Feb-13 9:00 
QuestionChange Collpased Text Color Settings in VB.Net Pin
AmbiguousName6-Feb-13 23:46
AmbiguousName6-Feb-13 23:46 
AnswerRe: Change Collpased Text Color Settings in VB.Net Pin
Richard MacCutchan7-Feb-13 0:52
mveRichard MacCutchan7-Feb-13 0:52 
GeneralRe: Change Collpased Text Color Settings in VB.Net Pin
AmbiguousName7-Feb-13 1:12
AmbiguousName7-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.