コード例 #1
0
        public virtual async Task <T?> AddAsync(T?entity)
        {
            if (entity is null)
            {
                return(null);
            }

            entity.IsActive = true;
            entity.Deleted  = false;

            var result = await _context.AddAsync(entity).ConfigureAwait(false);

            return(result.Entity);
        }