Exemplo n.º 1
0
        public async Task <TEntity> AddAsync(TEntity entity)
        {
            try
            {
                Services.LoggerBackgroundService.kayitsayisi++;

                await _cmsContext.AddAsync(entity);

                await _cmsContext.SaveChangesAsync();

                return(entity);
            }
            catch (Exception ex)
            {
                throw new Exception($"{nameof(entity)} could not be saved: {ex.Message}");
            }
        }