Click here to Skip to main content
15,499,046 members
Home / Discussions / C#
   

C#

 
AnswerRe: SecuGen SDK Pin
Ravi Bhavnani22-Aug-14 13:20
professionalRavi Bhavnani22-Aug-14 13:20 
GeneralRe: SecuGen SDK Pin
Member 1069240123-Aug-14 2:30
MemberMember 1069240123-Aug-14 2:30 
GeneralRe: SecuGen SDK Pin
Member 1069240123-Aug-14 2:51
MemberMember 1069240123-Aug-14 2:51 
AnswerRe: SecuGen SDK Pin
Ravi Bhavnani23-Aug-14 18:17
professionalRavi Bhavnani23-Aug-14 18:17 
GeneralRe: SecuGen SDK Pin
Member 1069240125-Aug-14 2:53
MemberMember 1069240125-Aug-14 2:53 
Questioncode for how to check if a file is encrypted in c# Pin
bandayashoda22-Aug-14 4:11
Memberbandayashoda22-Aug-14 4:11 
AnswerRe: code for how to check if a file is encrypted in c# Pin
Richard MacCutchan22-Aug-14 4:17
mveRichard MacCutchan22-Aug-14 4:17 
QuestionWPF / EF & 'Audit' field updates Pin
cjb11022-Aug-14 3:40
Membercjb11022-Aug-14 3:40 
I've got an WPF application (without MVVM or similar), using EF6 (via a OData Webservice) and I wondering whats the best place to update some 'audit' fields.

i.e. one entity looks like
C#
public class ActionStatus
{
   public int Id {get;set;}
   public string ActionStatus{get;set;}
   
   [DataType(DataType.Date)]
   public DateTime ValidFrom { get; set; }

   [DataType(DataType.Date)]
   public DateTime ValidTo { get; set; }

   public string ChangedBy { get; set; }
   public DateTime ChangedOn { get; set; }
}


So on the WPF side I've got this displayed in a DataGrid, which saves the data back etc, all good so far.
For the ChangedBy and ChangedOn fields I want the 'system' to update these as required.

But I'm not sure where it would go!

Doing it on the DataGrid events, seems very wrong...far too late, and would need to be done differently if I didn't use a datagrid in the future.

The other places, are the OData WebService, the EF Model, or in the entities themselves, or maybe as another part of the 'system', not sure...

I presume that this is one of the 'lots of solutions/it depends' type of problems, but some guidance would be helpful.
AnswerRe: WPF / EF & 'Audit' field updates Pin
Eddy Vluggen22-Aug-14 6:08
professionalEddy Vluggen22-Aug-14 6:08 
GeneralRe: WPF / EF & 'Audit' field updates Pin
cjb11022-Aug-14 6:27
Membercjb11022-Aug-14 6:27 
GeneralRe: WPF / EF & 'Audit' field updates Pin
Eddy Vluggen22-Aug-14 7:47
professionalEddy Vluggen22-Aug-14 7:47 
QuestionPlaying With Mouse Events Pin
Django_Untaken22-Aug-14 3:09
MemberDjango_Untaken22-Aug-14 3:09 
QuestionRe: Playing With Mouse Events Pin
Richard MacCutchan22-Aug-14 4:15
mveRichard MacCutchan22-Aug-14 4:15 
QuestionCreate & Download file runtime in MVC Pin
nitin_ion22-Aug-14 2:21
Membernitin_ion22-Aug-14 2:21 
AnswerRe: Create & Download file runtime in MVC Pin
Nathan Minier22-Aug-14 5:42
professionalNathan Minier22-Aug-14 5:42 
QuestionVS2010 crashes When Designer View Opens Pin
AmbiguousName21-Aug-14 21:43
MemberAmbiguousName21-Aug-14 21:43 
AnswerRe: VS2010 crashes When Designer View Opens Pin
Bernhard Hiller21-Aug-14 22:27
MemberBernhard Hiller21-Aug-14 22:27 
GeneralRe: VS2010 crashes When Designer View Opens Pin
AmbiguousName21-Aug-14 23:24
MemberAmbiguousName21-Aug-14 23:24 
GeneralRe: VS2010 crashes When Designer View Opens Pin
Rob Philpott22-Aug-14 1:05
MemberRob Philpott22-Aug-14 1:05 
QuestionDictionary<K,V> performance based on Key Type Pin
SledgeHammer0121-Aug-14 19:29
MemberSledgeHammer0121-Aug-14 19:29 
AnswerRe: Dictionary<K,V> performance based on Key Type Pin
Matty2221-Aug-14 19:42
MemberMatty2221-Aug-14 19:42 
GeneralRe: Dictionary<K,V> performance based on Key Type Pin
SledgeHammer0121-Aug-14 20:07
MemberSledgeHammer0121-Aug-14 20:07 
GeneralRe: Dictionary<K,V> performance based on Key Type Pin
Matty2221-Aug-14 20:11
MemberMatty2221-Aug-14 20:11 
AnswerRe: Dictionary<K,V> performance based on Key Type Pin
Matty2221-Aug-14 20:18
MemberMatty2221-Aug-14 20:18 
GeneralRe: Dictionary<K,V> performance based on Key Type Pin
SledgeHammer0121-Aug-14 20:53
MemberSledgeHammer0121-Aug-14 20:53 

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.