Ejemplo n.º 1
0
        public async Task <bool> DeleteAsync(DeleteMeasureUnitCommand request)
        {
            string commandText = $"DELETE FROM MeasureUnits ID = @Id";

            var parameters = new List <SqlParameter>
            {
                new SqlParameter("@Id", request.Id)
            };

            var result = await _sqlManager.DeleteAsync(commandText, CommandType.Text, parameters);

            if (result)
            {
                await _cacheService
                .DeleteKeyAsync(RedisDefaultKeys.GetAllMeasureUnits);
            }

            return(result);
        }