Exemplo n.º 1
0
 public async Task <IActionResult> Post([FromForm] DTO.ScaleSettings scaleSettings)
 {
     if (ModelState.IsValid)
     {
         _fieldSettings.UpdateScaleSettings(scaleSettings.FLAlliance, scaleSettings.LHSFL, scaleSettings.RHSFL, scaleSettings.IP);
         return(new NoContentResult());
     }
     return(BadRequest(ModelState));
 }
 public static DTO.ScaleSettings ToDTO(Domain.ScaleSettings domain_ScaleSettings)
 {
     DTO.ScaleSettings dto_ScaleSettings = new DTO.ScaleSettings
     {
         FLAlliance = domain_ScaleSettings.FieldLeftAlliance.ToString(),
         LHSFL      = domain_ScaleSettings.LHSAlliance(domain_ScaleSettings.FieldLeftAlliance).ToString(),
         RHSFL      = domain_ScaleSettings.RHSAlliance(domain_ScaleSettings.FieldLeftAlliance).ToString(),
         IP         = domain_ScaleSettings.IP.ToString()
     };
     return(dto_ScaleSettings);
 }