Пример #1
0
        public void AddEntity(T entity)
        {
            try
            {
                this._logger.LogInformation("方法:AddEntity" + "参数T:" + entity);

                _context.Set <T>().Add(entity);
            }
            catch (Exception ex)
            {
                this._logger.LogError("方法:AddEntity" + "参数T:" + entity + "错误信息:" + ex.Message);
            }
        }