public static DalLike ToDalLike(this ServiceLike like) { return(new DalLike { ID = like.ID, BookID = like.BookID, UserID = like.UserID, Like = like.Like }); }
public void RemoveLike(ServiceLike like) { unit.Likes.Delete(like.ToDalLike()); unit.Save(); }
public void AddLike(ServiceLike like) { unit.Likes.Create(like.ToDalLike()); unit.Save(); }
public void UpdateLike(ServiceLike like) { unit.Likes.Update(like.ToDalLike()); unit.Save(); }