I'm trying to do a web service but I get this error in the repository with the return and I do not understand why
The summary error message says that as it returns void, a keyword return must not be followed by an object expression.
public bool PuntoEntrega TarjetahabientePuntoEntregaModificar(TarjetaHabiente tarjetaHabiente, int puntoEntregaID, int idcliente, DbTransaction transaction)
{
var resultado = true;
try
{
var parametros = new Dictionary<string, object>
{
{ "Nacionalidad", (int)tarjetaHabiente.Nacionalidad },
{"Cedula", tarjetaHabiente.Cedula},
{"Cliente", tarjetaHabiente.Cliente.ID},
{"IDPuntoEntrega", puntoEntregaID},
{"IDPuntoEntregaNuevo", tarjetaHabiente.PtoEntrega.ID},
{"IDDepartamento", tarjetaHabiente.Departamento.ID}
};
if (transaction == null)
{
ExecuteNonQueryFromStoredProcedure("[Operaciones].[TarjetahabientePuntoEntregaModificar]", parametros);
}
else
{
ExecuteNonQueryFromStoredProcedure("[Operaciones].[TarjetahabientePuntoEntregaModificar]", transaction, parametros);
}
}
catch (Exception ex)
{
resultado = false;
Notificador.LogError(ErrorTipo.ErrorEnRepositorio, ex, Excepciones.MsjUIErrorGeneral);
}
return resultado;
}