Beispiel #1
0
        public override void AfterDeleteEntity(TEntity t)
        {
            Type thisType = GetType();

            PropertyInfo[]   thisProperties   = thisType.GetProperties();
            TranslateService translateService = ServiceProvider.GetService <TranslateService>();

            foreach (var thisProperty in thisProperties)
            {
                if (thisProperty.IsLocalizedProperty())
                {
                    foreach (var culture in CultureHelper.Cultures)
                    {
                        translateService.DeleteTranslation(
                            thisProperty.GetValue(this, null).ToString(),
                            culture.Code);
                    }
                }
            }
        }