'best practice to store multiple inputs value
I have created an asp.net web API project with angular in the front-end. I have to create a model like this :
but using a formGroup in typeScript will cost a lot of time and energy, same in the backend I have to create a +50 query to store the data.
this.formGroup=this.fb.group({
siloA1:['',Validators.required],
siloA2:['',Validators.required],
siloA3:['',Validators.required],
siloA4:['',Validators.required],
siloA5:['',Validators.required],
siloA6:['',Validators.required],
.............
in the service .net I have to repeat this code for every input :
shiftTranferStatusAdded = new ShiftTranferStatus
{
subsystemId = option.silo,
unitId = option.unite_id
};
shiftTranferAdded = _dbContext.shiftTranfers.Add(shiftTranferAdded);
Which are the steps to follow to achieve that?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

