예제 #1
0
 public static async Task SaveOrUpdate <TEntity>(
     this DbContext db,
     TEntity entity,
     CancellationToken ct = default) where TEntity : class, IEntity
 {
     if (entity.IsNew())
     {
         await db.AddSavingAsync(entity);
     }
 }