public void AddPhotoPath(string spot_id, string photo_path)
        {
            AspNetSpotPhoto model = new AspNetSpotPhoto();
            int             buff  = GetLastPhotoPathID();

            buff += 1;


            model.Id      = buff;
            model.spot_id = spot_id;
            model.path    = photo_path;
            spotphoto_entity.AspNetSpotPhotos.Add(model);
            spotphoto_entity.SaveChanges();
        }
 public void DeleteImage(AspNetSpotPhoto model)
 {
     spotphoto_entity.AspNetSpotPhotos.Remove(model);
     spotphoto_entity.SaveChanges();
 }
 public void UpdatePhoto(AspNetSpotPhoto model, string path)
 {
     model      = spotphoto_entity.AspNetSpotPhotos.Find(model.Id);
     model.path = path;
     spotphoto_entity.SaveChanges();
 }