I have defined the keys in each of those entities with the attribute [key] as you can see in the photo, apart from that the namespace is imported "using System.ComponentModel.DataAnnotations;" and when creating controllers this happens.
for this case, the traveling class is defined as follows:
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
namespace OsAgenciaUSBT.Models
{
public class Viajero
{
[key]
public int IdViajero { get; set; }
public string tipoViajero { get; set; }
public string nombres { get; set; }
public string Apellidos { get; set; }
public int telefono { get; set; }
[DataType(DataType.Date)]
public DateTime Update { get { return DateTime.Now; } }
public virtual ICollection<Venta> Venta { get; set; }
}
}