Explorar el Código

fixed sql query bug.

master
yangxiaodong hace 7 años
padre
commit
c9ac0108fe
Se han modificado 1 ficheros con 1 adiciones y 2 borrados
  1. +1
    -2
      src/DotNetCore.CAP.SqlServer/SqlServerStorageConnection.cs

+ 1
- 2
src/DotNetCore.CAP.SqlServer/SqlServerStorageConnection.cs Ver fichero

@@ -6,7 +6,6 @@ using System.Threading.Tasks;
using Dapper;
using DotNetCore.CAP.Infrastructure;
using DotNetCore.CAP.Models;
using Microsoft.EntityFrameworkCore;

namespace DotNetCore.CAP.SqlServer
{
@@ -102,7 +101,7 @@ VALUES(@Name,@Group,@Content,@Retries,@Added,@ExpiresAt,@StatusName);";

public async Task<IEnumerable<CapReceivedMessage>> GetFailedReceviedMessages()
{
var sql = $"SELECT TOP (1) * FROM [{_options.Schema}].[Received] WITH (readpast) WHERE StatusName = '{StatusName.Failed}'";
var sql = $"SELECT * FROM [{_options.Schema}].[Received] WITH (readpast) WHERE StatusName = '{StatusName.Failed}'";
using (var connection = new SqlConnection(_options.ConnectionString))
{
return await connection.QueryAsync<CapReceivedMessage>(sql);


Cargando…
Cancelar
Guardar