public virtual SysExceptionModel GetById(string id)
        {
            if (IsExists(id))
            {
                tbl_SysException  entity = m_Rep.GetById(id);
                SysExceptionModel model  = new SysExceptionModel();
                model.Id         = entity.Id;
                model.HelpLink   = entity.HelpLink;
                model.Message    = entity.Message;
                model.Source     = entity.Source;
                model.StackTrace = entity.StackTrace;
                model.TargetSite = entity.TargetSite;
                model.Data       = entity.Data;
                model.CreateTime = entity.CreateTime;

                return(model);
            }
            else
            {
                return(null);
            }
        }
        public virtual bool Create(ref ValidationErrors errors, SysExceptionModel model)
        {
            try
            {
                tbl_SysException entity = m_Rep.GetById(model.Id);
                if (entity != null)
                {
                    errors.Add(Suggestion.PrimaryRepeat);
                    return(false);
                }
                entity            = new tbl_SysException();
                entity.Id         = model.Id;
                entity.HelpLink   = model.HelpLink;
                entity.Message    = model.Message;
                entity.Source     = model.Source;
                entity.StackTrace = model.StackTrace;
                entity.TargetSite = model.TargetSite;
                entity.Data       = model.Data;
                entity.CreateTime = model.CreateTime;


                if (m_Rep.Create(entity))
                {
                    return(true);
                }
                else
                {
                    errors.Add(Suggestion.InsertFail);
                    return(false);
                }
            }
            catch (Exception ex)
            {
                errors.Add(ex.Message);
                ExceptionHandler.WriteException(ex);
                return(false);
            }
        }