1
I took that mistake:
The 'Datalib' Property on 'Release' could not be set to a 'System.Double' value. You must set this Property to a non-null value of type 'System.Single'
The thing is that I commented on the property in my Entity Model and also in lambda, like this:
public IEnumerable<Liberacao> getAutoriza(int idorcamento)
{
var lista = contexto.Liberacoes
.Where(lib => lib.IdOrcamento == idorcamento)
.ToList()
.Select(lib => new Liberacao
{
TipoVenda = lib.TipoVenda,
Vencimento = lib.Vencimento,
Juros = lib.Juros,
Entrada = lib.Entrada,
Acrescimo = lib.Acrescimo,
Desconto = lib.Desconto,
Mensagem = lib.Mensagem,
//DataLib = lib.DataLib,
Vendedor = lib.Vendedor,
Cliente = lib.Cliente,
Filial = lib.Filial
}).ToList();
return lista;
}
I just don’t understand why the error persists in the same field. I already gave a clean in Solution and nothing.
which line the error occurs ?
– Rovann Linhalis
@Rovannlinhalis, as it is a lambda expression, only at the end of the expression, presents the error, since it reads the expression at once
– pnet
how is the declaration of this field ?
– Rovann Linhalis
[Column("DATALIB")]
 public float DataLib { get; set; }
– pnet
and what type of column in the database ?
– Rovann Linhalis
Let’s go continue this discussion in chat.
– Rovann Linhalis