Ejemplo n.º 1
0
        public List <T> ListarLogDo(Domain.Model.Log diagnostico)
        {
            var query = GetQueryExpression <T>(true);

            query.Criteria.Conditions.Add(new ConditionExpression("New_DiagnosticoId", ConditionOperator.Equal, diagnostico.Id));
            query.Orders.Add(new OrderExpression("createdon", OrderType.Descending));
            return((List <T>) this.RetrieveMultiple(query).List);
        }
Ejemplo n.º 2
0
        public void Add(LogCreateDTO log)
        {
            Domain.Model.Log model = new Domain.Model.Log()
            {
                Id              = Guid.NewGuid(),
                ClassName       = log.ClassName,
                LogDate         = DateTimeOffset.Now,
                Message         = log.Message,
                MethodName      = log.MethodName,
                UserId          = log.UserId,
                UserEmail       = log.UserEmail,
                ControllerName  = log.ControllerName,
                Exception       = log.Exception,
                FriendlyMessage = log.FriendlyMessage,
                StackTrace      = log.StackTrace
            };

            _unitOfWork.Logs.Add(model);
            _unitOfWork.Commit();
        }