Good morning, I have the following problem. In a sqlserver database, I have an entity with datetime fields, I generated 2 new date fields and updated my model from the database. The fields were imported without problems, I add them to the corresponding class, and when doing the query it tells me:
Can not convert the System.DateTime type? in System.DateTime, Ya there is an explicit conversion
This is how the fields that work are declared:
public DateTime FechaCreacion {get;set;}
public DateTime FechaModif {get;set;}
And the ones I'm wanting Add:
public DateTime FechaAsign { get; set; }
public DateTime FechaCierre { get; set; }
And my Query:
query = (from q in _conexion.Ticket_Cab where [bla..bla..bla]
select new Ticket {[bla..bla] FechaCreacion = q.tik_fechacreacion,
FechaModif = q.tik_fechamodif, FechaAsign = q.tik_fechaAsign,
FechaCierre = q.tik_fechaCierre}).ToList();
The last two fields (q.tik_fechaAsign , q.tik_fechaCierre )
highlights them in red and throws me the error I quote above. Does anyone know what may be happening?