Ejemplo n.º 1
0
    public void deleteProfilePost(int id)
    {
        var comments = ProfilePostComments.Where(c => c.parent.id == id).ToList();

        RemoveRange(comments);
        Remove(GetProfilePostById(id));
        SaveChanges();
    }
Ejemplo n.º 2
0
 public ProfilePostComment GetProfilePostCommentById(int i)
 {
     return(ProfilePostComments.Where(p => p.id == i).FirstOrDefault());
 }
Ejemplo n.º 3
0
    public List <ProfilePostComment> GetCommentsOnProfilePost(ProfilePost pp)
    {
        var s = ProfilePostComments.Where(pc => pc.parent == pp).ToList();

        return(s);
    }