(Use RAZOR) What I need is for my database to delete ROWS created 30 days ago, the creation date I am saving in a Datetime type field. So far I can only subtract and obtain the day address, for example:
var Fecha = solicitud.fechainicio - DateTime.Now;
In this way I obtain the difference of days, hours and minutes between the insertion and the current date. but at the time of trying to execute some type of code by @if(Fecha>=30){AQUI IRIÁ LA SENTENCIA SQL PARA ELIMINAR.}
I miss the following error:
El operador '>=' no se puede aplicar a operandos del tipo 'System.TimeSpan' y 'int
'