1
I have the following expression
retorno = (from ven in context.VendaModel
select new
{
ven.barras,
ven.data,
ven.valor
}).ToList();
I need to search only what you have on a list that will be passed by parameter, for example the following list:
string[] filiais = { "11.111.111/0001-11", "11.111.111/0001-12", "11.111.111/0001-15" };
need to be returned all cnpj sales from the list. What would this expression look like ?
vendamodel class:
[Table("venda")]
public class VendaModel
{
[Key]
[Required]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int id_vendas { get; set; }
public string cpf { get; set; }
public string data { get; set; }
public string hora { get; set; }
public string barras { get; set; }
public string valor { get; set; }
public string qtde { get; set; }
public int cupom { get; set; }
public string cnpj_filial { get; set; }
public string cnpj_matriz { get; set; }
}
Paul, I tried this way, but generates this Exception "Object should implement Iconvertible."
– alessandre martins
Put your question to your Vendamodel class
– Pablo Tondolo de Vargas
I made a small change in my reply
– Pablo Tondolo de Vargas
Paul, it worked, the problem was in the hour field
– alessandre martins