public async Task <ActionResult <FormEmail> > Add([FromBody] List <FormEmail> modellist) { if (ModelState.IsValid) { try { var id = await ImailFormRepo.Add(modellist); } catch (Exception ex) { return(StatusCode(404, "There was a problem saving record in the database. Please try again.")); } } return(CreatedAtAction("Add", new { id = modellist[0].id }, modellist)); }