1
In my Entity mapping, the fields that are FK got like this:
public virtual T_Acao T_Acao { get; set; }
public virtual ICollection<T_OsParceiro> T_OsParceiro { get; set; }
public virtual T_ProximaAcao T_ProximaAcao { get; set; }
In my program I need to pass a string value to T_acao. How do I do this? I tried a cast like this, but I couldn’t:
tarefa.T_Acao = osParceiro.AcaoParceiro;
AcaoParceiro
is the type string
. I tried a cast that way:
tarefa.T_Acao = (SuporteTecnico.Models.T_Acao)osParceiro.AcaoParceiro;
The mistake is:
Cannot implicity Convert type "string" to
SuporteTecnico.Models.T_Acao
The mistake is clear. You are trying to use a
string
to assign to an object. I don’t understand why you need to necessarily pass astring
.– Leonel Sanches da Silva
is that it comes like this
– pnet
So ask me the question of all models, please:
T_Acao
,T_OsParceiro
,T_ProximaAcao
.– Leonel Sanches da Silva