Beispiel #1
0
        public async Task <CreateNewsResponse> CreateNews(CreateNewsRequest requestModel)
        {
            var author = await _admin.FindById(requestModel.AuthorId);

            var news = CreateNewsRequest.NewNewsFromRequest(requestModel, author);

            news = await _repoWrapper.News.CreateAsync(news);

            return(CreateNewsResponse.CreateFromNews(news));
        }
Beispiel #2
0
 public static NewsModel MapCreateNewsResponce(CreateNewsResponse model)
 {
     return(MapNewsEntity(model.News));
 }