Esempio n. 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)));
        }
Esempio n. 2
0
 internal Blog Create(Blog newBlog)
 {
     return(_repo.Create(newBlog));
 }
Esempio n. 3
0
 internal object Create(Blog newBlog)
 {
     return(_repo.Create(newBlog));
 }
 public Blog Create(Blog newBlog)
 {
     return(_repo.Create(newBlog));
 }
Esempio n. 5
0
        internal Blog Create(Blog newBlog)
        {
            Blog createdBlog = _repo.Create(newBlog);

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