public void OnPreDeleteRecord(string entityName, EntityRecord record, List <ErrorModel> errors) { var service = new EmailServiceManager().GetSmtpService((Guid)record["id"]); if (service != null && service.IsDefault) { errors.Add(new ErrorModel { Key = "id", Message = "Default smtp service cannot be deleted." }); } else { EmailServiceManager.ClearCache(); } }
public void OnPostUpdateRecord(string entityName, EntityRecord record) { EmailServiceManager.ClearCache(); }