I have models that have a one-to-many relationship. I want to insert data by using a single call. Can you help me how can I write mine for the controller? I am using Asp.net core 3.1. Bellow is my detail code:
Model 1: FacilityFixed
 public class FacilityFixed : FullAuditedEntity, IMustHaveTenant{
  public string Name { get; set; } 
  public ICollection<FacilityCompartment> FacilityCompartment { get; set; }
  
  }
Model 2: FacilityCompartment
public class FacilityCompartment : FullAuditedEntity, IMustHaveTenant
    {
        public string Name { get; set; }
        public int SensorId { get; set; }
        public FacilityFixed FacilityFixed { get; set; }
       }
Controller
 public async Task CreateFacilityFixed(CreateFacilityFixedInput input){
       var FacilityFixed = ObjectMapper.Map<FacilityFixed>(input);
       await _FacilityFixedRepository.InsertAsync(FacilityFixed);
        }
I am working in Asp.net core. Asp.Net Zero, boiler Plate.