public CreateFavoritePageWork(FavoritesRepository favoritesRepository, ResourceRepository resourceRepository, CreateFavoritePageContract data, int userId) : base(favoritesRepository) { m_favoritesRepository = favoritesRepository; m_resourceRepository = resourceRepository; m_data = data; m_userId = userId; }
public long CreateFavoritePage(CreateFavoritePageContract data) { var userId = m_authenticationManager.GetCurrentUserId(); var work = new CreateFavoritePageWork(m_favoritesRepository, m_resourceRepository, data, userId); var resultId = work.Execute(); return(resultId); }
public long CreateFavoritePage(CreateFavoritePageContract data) { try { var result = m_client.Post <long>("favorite/page", data); return(result); } catch (HttpRequestException e) { if (m_logger.IsErrorEnabled()) { m_logger.LogError("{0} failed with {1}", m_client.GetCurrentMethod(), e); } throw; } }
public long CreateFavoritePage([FromBody] CreateFavoritePageContract data) { var resultId = m_favoriteManager.CreateFavoritePage(data); return(resultId); }