Exemple #1
0
        public async Task <Response <FeedReadDto> > AddFeed(FeedDTO model)
        {
            var response = new Response <FeedReadDto>();
            var category = FeedProfile.FeedDtoToFeedMapper(model);

            if (await _feedRepo.Add(category))
            {
                var feedDto = FeedProfile.FeedToFeedReadDtoMapper(category);
                response.Success = true;
                response.Message = "category created successfully";
                response.Data    = feedDto;
                return(response);
            }

            response.Message = "category failed to add";
            return(response);
        }
Exemple #2
0
 public void RemoveFeedProfile(FeedProfile feedProfile)
 {
     _unitOfWork.FeedProfile.Add(feedProfile);
 }