public async Task <IHttpActionResult> SetRxUrl(SetPathBindingModel model) { try { var entity = await HGContext.PatientInfos.FirstOrDefaultAsync(x => x.Id == model.Id); entity.RecommendationImageUrl = model.Path; var response = await HGContext.SaveChangesAsync(); return(Ok()); } catch { _logger.ErrorFormat("Error while updating PatientInfo Id: {0} RxUrl: {1}", model.Id, model.Path); return(BadRequest()); } }
public async Task <IHttpActionResult> SetIdUrl(SetPathBindingModel model) { var entity = await HGContext.PatientInfos.FirstOrDefaultAsync(x => x.Id == model.Id); entity.DriversLicenseImageUrl = model.Path; var response = await HGContext.SaveChangesAsync(); if (response > 0) { return(Ok()); } else { _logger.ErrorFormat("Error while updating PatientInfo Id: {0} PhotoIdUrl: {1}", model.Id, model.Path); return(BadRequest()); } }
public async Task<IHttpActionResult> SetRxUrl(SetPathBindingModel model) { try { var entity = await HGContext.PatientInfos.FirstOrDefaultAsync(x => x.Id == model.Id); entity.RecommendationImageUrl = model.Path; var response = await HGContext.SaveChangesAsync(); return Ok(); } catch { _logger.ErrorFormat("Error while updating PatientInfo Id: {0} RxUrl: {1}", model.Id, model.Path); return BadRequest(); } }
public async Task<IHttpActionResult> SetIdUrl(SetPathBindingModel model) { var entity = await HGContext.PatientInfos.FirstOrDefaultAsync(x => x.Id == model.Id); entity.DriversLicenseImageUrl = model.Path; var response = await HGContext.SaveChangesAsync(); if (response > 0) { return Ok(); } else { _logger.ErrorFormat("Error while updating PatientInfo Id: {0} PhotoIdUrl: {1}", model.Id, model.Path); return BadRequest(); } }