public static TDao AsModifiedAuditable <TDao>(this TDao dao, IProcessorContext context) where TDao : AuditableDao { var userId = context.Get <string>(ProcessorContextKeys.UserId); var utcTime = context.Get <DateTime>(ProcessorContextKeys.UTCTime); dao.ModifiedByUserId = userId; dao.ModificationDate = utcTime; return(dao); }
public static T Get <T>(this IProcessorContext context) { return(context.Get <T>(ProcessorContextKeys.Default)); }
public static T Get <T>(this IProcessorContext context, string key) { return((T)context.Get(typeof(T), key)); }