After selecting the official location, I want to filter and edit the image and then save sql.
**My Model and Controller codes below**
**my codes**
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Create([Bind(Include = "PhotoId,Decription,ThumbPath,ImagePath")] Photo photo, HttpPostedFileBase ImagePath)
{
if (ModelState.IsValid)
{
if (ImagePath.ContentLength > 0)
{
var image = Path.GetFileName(ImagePath.FileName);
var path = Path.Combine(Server.MapPath("~/Images"), image);
ImagePath.SaveAs(path);
photo.ImagePath = "/Images/" + image;
db.Photo.Add(photo);
db.SaveChanges();
return RedirectToAction("Index");
}
return HttpNotFound();
}
return HttpNotFound();
}
public partial class Photo
{
public int PhotoId { get; set; }
public string Decription { get; set; }
public string ThumbPath { get; set; }
public string ImagePath { get; set; }
}
[Images](https://hizliresim.com/BlYSSR)
**I want to save sql image like this**
Filters
[images link] https://hizliresim.com/BlYSSR
Sachin SinghPosted Nov 17, 2020, 10:52 PM
Baybars BayPosted Nov 18, 2020, 7:15 AM