Example #1
0
        public async Task <ActionResult <VaccineDeliveryReport> > AddDeliveryReport([FromBody] VaccineDeliveryReport report)
        {
            if (!ModelState.IsValid)
            {
                Console.WriteLine("Invalid state...");
                return(BadRequest(ModelState));
            }
            var newReport = await _IInleveransRepository.AddDeliveryReport(report);

            return(CreatedAtAction(nameof(GetAllDeliveryReport), new { id = newReport.Id }, newReport));
        }