public MaxTableModel GetMaxCiRegistro(long idPuntoMedicion) { MaxTableModel maximos= new MaxTableModel(); try { using(var entity=new db_SeguimientoProtocolo_r2Entities()) { (from res in entity.spGetMaxTableCiRegistro(idPuntoMedicion) select res).ToList().ForEach(row => { maximos.LastModifiedDate = row.LastModifiedDate; maximos.ServerLastModifiedDate = row.ServerLastModifiedDate; }); } } catch (Exception) { maximos = null; } return maximos; }