etkmlm
Member
- Joined
- Sep 14, 2020
- Messages
- 9
- Programming Experience
- 3-5
Hi, I'm using MVC5 with .NET 4.6.1.
I want to users can follow each other but don't know how can I do this.. I tried these things:
but changes are not reflected in the database. Tried ICollection but it creates a ton of relates.
I want to users can follow each other but don't know how can I do this.. I tried these things:
C#:
public class User
{
[Key]
public int ID { get; set; }
public String Avatar { get; set; }
public String State { get; set; }
public String Mail { get; set; }
public String Username { get; set; }
public String Password { get; set; }
public ICollection<Post> Posts { get; set; }
public IEnumerable<User> Follows { get; set; }
public String RegDate { get; set; }
public IEnumerable<Post> LikesPost { get; set; }
public IEnumerable<Post> DislikesPost { get; set; }
public IEnumerable<Comment> LikesComment { get; set; }
public IEnumerable<Comment> DislikesComment { get; set; }
public IEnumerable<Label> FavLabels { get; set; }
public int Report { get; set; }
}
but changes are not reflected in the database. Tried ICollection but it creates a ton of relates.
Last edited: