예제 #1
0
        public async Task <AddOrUpdateOperationResult <TEntity> > AddWithBlocksAsync(TEntity item,
                                                                                     IBioRepositoryOperationContext?operationContext = null)
        {
            var result = await DoAddAsync(item, operationContext);

            if (result.isValid)
            {
                await BlocksHelper.AddBlocksAsync(item, DbContext);
                await DoSaveAsync(item, null, null, operationContext);
            }

            return(new AddOrUpdateOperationResult <TEntity>(item, result.errors, new PropertyChange[0]));
        }