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)); }
public UserPostRelation(Guid userId, UserPostRelationType userPostRelationType) : this() { UserId = userId; UserPostRelationType = userPostRelationType; }