public static void InitSchema(this ICrudEvents events) { if (events is IRequiresSchema requiresSchema) { requiresSchema.InitSchema(); } }
public static void Clear(this ICrudEvents events) { if (events is IClearable clearable) { clearable.Clear(); } else { throw new NotSupportedException($"{events.GetType().Name} does not implement IClearable"); } }