public void OnGet() { Name = "this"; if (Request.Query["id"].Count >= 1) { ClientID = Request.Query["id"].ToString(); } AppraisalsContext context = new AppraisalsContext("server=aaperfected.cvsd2ftiozra.us-east-1.rds.amazonaws.com;port=3306;database=Appraisals;user=aapreferred;password=FiftyMillion%%01;"); if (ClientID != string.Empty && ClientID != null) { _report = context.getReport(ClientID); _report.photos = context.getPhotoByClientID(ClientID); if (_report.basicInfo.vin != null) { VinDecoded = decodeVIN(_report.basicInfo.vin.ToUpper()); } string test = string.Empty; } else { _report = context.getReport("a07ba482-2551-445a-977a-9a4d86bfa0c4"); _report.photos = context.getPhotoByClientID("a07ba482-2551-445a-977a-9a4d86bfa0c4"); VinDecoded = new Vin(); } }
// GET: /<controller>/ public IActionResult Index() { AppraisalsContext context = HttpContext.RequestServices.GetService(typeof(AppraisalsContext)) as AppraisalsContext; return(View(context.GetAllClients())); }