Class that receives the query data
public class EngineEntity
{
public string FacturaId { get; set; }
public string Cliente { get; set; }
public int? TipoFactura { get; set; }
public double? Monto { get; set; }
public double? Impuesto { get; set; }
public double? Total { get; set; }
public string OrdenCompra { get; set; }
public DateTime? Fecha { get; set; }
public string Codigo { get; set; }
public string Descripcion { get; set; }
public double? Cantidad { get; set; }
public double? Precio { get; set; }
public double? SubTotal { get; set; }
}
This is the method where I execute the query ... but in the WHERE it tells me that you can not implicitly convert the string type in Boolean What will I be doing wrong?
public IQueryable<EngineEntity> FacturaInformacion(string FacturaId)
{
IQueryable<EngineEntity> valor;
EMCEntities1 Modelo = new EMCEntities1();
using (Modelo)
{
valor = from a in Modelo.FacturaDatos
join b in Modelo.FacturaDetail on a.FacturaId equals b.FacturaId where a.FacturaId = FacturaId
select new EngineEntity
{
FacturaId = a.FacturaId,
Cliente = a.Cliente,
TipoFactura = a.TipoFactura,
Monto = a.Monto,
Impuesto = a.Impuesto,
Total = a.Total,
OrdenCompra = a.OrdenCompra,
Fecha = a.Fecha,
Codigo = b.Codigo,
Descripcion = b.Descripcion,
Cantidad = b.Cantidad,
Precio = b.Precio,
SubTotal = b.SubTotal
};
}
return valor;
}