Пример #1
0
        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);
        }
Пример #2
0
 public static T Get <T>(this IProcessorContext context)
 {
     return(context.Get <T>(ProcessorContextKeys.Default));
 }
Пример #3
0
 public static T Get <T>(this IProcessorContext context, string key)
 {
     return((T)context.Get(typeof(T), key));
 }