public NewbornAccountResponse Create(NewbornCreateRequest model) { // map model to new account object var newborn = _mapper.Map <Newborn>(model); //newborn.HealthCareProvider = ; newborn.Created = DateTime.UtcNow; //newborn.Verified = DateTime.UtcNow; // save account _context.Newborns.Add(newborn); _context.SaveChanges(); return(_mapper.Map <NewbornAccountResponse>(newborn)); }
public ActionResult <NewbornAccountResponse> Create(NewbornCreateRequest model) { var account = _newbornService.Create(model); return(Ok(account)); }