Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class User
- {
- public int Id { get; set; }
- public string Name { get; set; }
- public string Email { get; set; }
- public string Username { get; set; }
- public string Password { get; set; }
- public DateTime Created_at { get; set; }
- public ICollection<Device> Devices { get; set; }
- }
- public class Device
- {
- public int Id { get; set; }
- public string Name { get; set; }
- public string Type { get; set; }
- public string Gateway { get; set; }
- public DateTime Created_at { get; set; }
- public int User_id { get; set; }
- public User User;
- }
- HasMany(t => t.Devices)
- .WithRequired(t => t.User)
- .WillCascadeOnDelete(true);
- The expression 't => t.User' is not a valid property expression. The expression should represent a property: C#: 't => t.MyProperty' VB.Net: 'Function(t) t.MyProperty'.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement