Exemplo n.º 1
0
 public void Like()
 {
     UserPostRelationType = UserPostRelationType.Like;
     AddUserLikedPostDomainEvent();
 }
 public async Task <UserPostRelation> GetAsync(Guid userId, Guid postId, UserPostRelationType relationType)
 {
     return(await _context.UserPostRelations
            .SingleOrDefaultAsync(upr => upr.UserId == userId && upr.PostId == postId && upr.UserPostRelationType == relationType));
 }
Exemplo n.º 3
0
 public UserPostRelation(Guid userId, UserPostRelationType userPostRelationType) : this()
 {
     UserId = userId;
     UserPostRelationType = userPostRelationType;
 }