0
legion123 created
i use EntityFramework and Module-Zero example
i hope this class
[Table("Tasks")]
public class Task : Entity<long>
{
public Task()
{
}
public virtual string taskName { get; set; }
// module-zero user class EF automatic link
public virtual User usr { get; set; }
[ForeignKey("UserId")]
public virtual long? UserId { get; set; }
}
but An Error occured [The property 'UserId' cannot be configured as a navigation property. The property must be a valid entity type and the property should have a non-abstract getter and setter. For collection properties the type must implement ICollection<T> where T is a valid entity type.]
what can i do ? thank you.