Пример #1
0
 public virtual void Like(int eventId, string userId)
 {
     if (!_likeRepository.Exists(new Like()
     {
         UserId = userId, EventId = eventId
     }))
     {
         _likeRepository.Like(new Like()
         {
             UserId = userId, EventId = eventId
         });
     }
 }
 public async Task <ActionResult <LikeDto> > Like([FromBody] LikeDto dto)
 {
     return(Ok(await _repository.Like(dto)));
 }
Пример #3
0
 public ActionResult <LikeDto> Like([FromBody] LikeDto dto)
 {
     return(Ok(_repository.Like(dto)));
 }