コード例 #1
0
        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());
            }
        }
コード例 #2
0
        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());
            }
        }
コード例 #3
0
 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();
     }
 }
コード例 #4
0
 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();
     }
 }