Beispiel #1
0
        public IActionResult Create(BlogsDTO model, IFormFile Image)
        {
            var imageName = FileHelper.SaveFile(Image, _fileConfig, FileType.Image, _environment.WebRootPath);

            if (imageName != null)
            {
                model.Image = imageName;
            }
            var result = _blogsRepository.Create(model);

            TempData.AddResult(result);
            return(RedirectToAction(nameof(Index)));
        }
Beispiel #2
0
 internal Blog Create(Blog newBlog)
 {
     return(_repo.Create(newBlog));
 }
 internal object Create(Blog newBlog)
 {
     return(_repo.Create(newBlog));
 }
 public Blog Create(Blog newBlog)
 {
     return(_repo.Create(newBlog));
 }
        internal Blog Create(Blog newBlog)
        {
            Blog createdBlog = _repo.Create(newBlog);

            return(createdBlog);
        }
Beispiel #6
0
 internal Blog Create(Blog newBlog)
 {
     newBlog.Id = _repo.Create(newBlog);
     return(newBlog);
 }
Beispiel #7
0
 public Blog Create(Blog newBlog)
 {
     newBlog.Id = _repo.Create(newBlog);
     return(newBlog);
 }