예제 #1
0
        public async Task Delete(string entityId)
        {
            if (string.IsNullOrWhiteSpace(entityId))
            {
                throw new ArgumentNullException(nameof(entityId));
            }

            var command = BuildDeleteStatement();

            _cacheHandler.DropFromCache(entityId);

            using (var connection = new SqlConnection(_databaseConfiguration.ConnectionString))
            {
                await connection.ExecuteAsync(command, new { Id = entityId });
            }
        }