Exemplo n.º 1
0
        /// <summary>
        /// Inserts an activity log item
        /// </summary>
        /// <param name="systemKeyword">System keyword</param>
        /// <param name="comment">Comment</param>
        /// <param name="entity">Entity</param>
        /// <returns>Activity log item</returns>
        public virtual ActivityLog InsertActivity(string systemKeyword, string comment, BaseEntity entity = null)
        {
            System.Security.Claims.ClaimsPrincipal user = _httpContextAccessor.HttpContext.User;
            Customer customer = user.GetCustomer(_userManager, _customerService);

            if (customer != null)
            {
                return(InsertActivity(customer, systemKeyword, comment, entity));
            }


            return(InsertActivity(systemKeyword, comment, entity));
        }