示例#1
0
 public static void InitSchema(this ICrudEvents events)
 {
     if (events is IRequiresSchema requiresSchema)
     {
         requiresSchema.InitSchema();
     }
 }
示例#2
0
 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");
     }
 }