public async Task<IActionResult> Edit(Portfoliopage entity, IFormFile file)
 {
     var model = _portfoliopageService.GetById(entity.PortfoliopageId);
     if (file != null && file.ContentType.Contains("image"))
     {
         var path = Path.Combine(Directory.GetCurrentDirectory(), "wwwroot\\Site\\img", file.FileName);
         using (var stream = new FileStream(path, FileMode.Create))
         {
             await file.CopyToAsync(stream);
         }
         entity.BackgroundImage = file.FileName;
     }
     else
     {
         entity.BackgroundImage = model.BackgroundImage;
     }
     if (ModelState.IsValid)
     {
         _portfoliopageService.Update(entity);
         TempData.Put("message", new ResultMessage()
         {
             Title = "Bildirim",
             Message = "Projelerim Sayfası başarılı bir şekilde güncellendi.",
             Css = "success"
         });
         return RedirectToAction("Index");
     }
     return View(entity);
     
 }
 public void Delete(Portfoliopage entity)
 {
     _portfoliopageDal.Delete(entity);
 }
 public void Update(Portfoliopage entity)
 {
     _portfoliopageDal.Update(entity);
 }
 public void Create(Portfoliopage entity)
 {
     _portfoliopageDal.Create(entity);
 }