public IActionResult RemovePhoto([FromBody] Heritage heritage) { AppSettings appSettings = heritageRepository.GetAppSettings(_config); string folderPath = _environment.WebRootPath; RetSimple retVal = new RetSimple { success = false, message = "There was problem to remove photo." }; //string card_id = ""; if (heritage?.hers != null && heritage?.hers.Count > 0) { retVal = heritageRepository.RemovePhoto((heritage.hers[0]).id, folderPath, appSettings.emptyPhoto); } return(new JsonResult(retVal)); }
// GET: /<controller>/ public IActionResult HerEdit(string id) { AppSettings appSettings = heritageRepository.GetAppSettings(_config); CardIds cardIds = heritageRepository.GetLevelsAsIntList(id); HeritageViewModel model = heritageRepository.GetHerEditModelByLevels(cardIds); //model.user_id = 2; //model.lName = "albert"; return(View("HerEdit", model)); }