I have a two databases in place. One will be used to collect survey data while the other contains data from "clients". On the web form, the client is to input he's/her policy number. I would like to validate the data that will be input to ensure only existing clients fill in the form:
I have already configured my appsettings.json
and Startup.cs
as below:
{
"ConnectionStrings": {
"DefaultConnection": "Data Source=yyyy.yy;Initial Catalog=Mydb;Integrated Security=True",
"IPAC": "Server=xxx.xx.xx;Database=50_TEST;UID=user;Password=password"
}
Startup.cs
Configuration.GetConnectionString("DefaultConnection")))
.AddDbContext<ApplicationDbContext>(options =>
options.UseSqlServer(Configuration.GetConnectionString("IPAC")));
Assuming that my form only accepts the PolicyNo field, how do I go about ensuring that this works?