private void _saveImage(Image img)
 {
     try
     {
         if (!_imageAlreadyExists(img))
         {
             Logger.Debug("Saving new " + img.ImagePath + " to Context");
             _contextObs.Add(img);
             Logger.Debug(".. Saved to Context");
             imageImportCounter++;
         }
         else
         {
             Image exImg = _getExistingImage(img);
             if (exImg != null)
             {
                 _updateImageProperties(img, ref exImg);
                 _contextObs.Update(exImg);
                 imageUpdateCounter++;
                 Logger.Debug($"{img.ImagePath} updated");
             }
         }
     }
     catch (Exception e)
     {
         Logger.Error(e.InnerException, "Error Adding Image to Context");
     }
 }
        public async Task <IActionResult> Create([Bind("ID,Slicer,Printer,Estimate,Actual")] Observation observation)
        {
            if (ModelState.IsValid)
            {
                _context.Add(observation);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(observation));
        }