EntityService.Like Method

Namespace:
Weavy.Core.Services
Assembly:
Weavy.Core.dll

Like(TLikeable, int?, bool)

Like the specified entity.

public static TLikeable Like<TLikeable>(TLikeable likeable, int? userId = default(int? ), bool auth = true)

    where TLikeable : class, ILikeable

Parameters

likeable

The entity to like.

userId
int?

Id of the User that likes, default is null which indicates the current user.

auth
bool

true to check permissions, otherwise false

Returns

The liked entity.