Example #1
0
        public ActionResult <string> Post([FromBody] PersonCreateRequest personCreateRequest)
        {
            var sw     = Stopwatch.StartNew();
            var person = personServices.CreatePerson(personCreateRequest);

            if (person == null)
            {
                return("Email ID already exist. Please try different ID");
            }
            var credentialCreateRequest = new CredentialsCreateRequest(person);

            credentialService.CreateCredentials(credentialCreateRequest);
            sw.Stop();
            LoginDuration
            .WithLabels("Create_Person")
            .Observe(sw.Elapsed.TotalSeconds);
            return("User Created ID: " + person.PersonId.ToString());
        }