public void UnitTestAddMemberRecords()
        {
            _memberrequest.AddNewMemberEntry(
                "Bill",
                "Blogs",
                "*****@*****.**",
                "0229230292",
                DateTime.Parse("1990-10-12"),
                "Active"
                );

            int ct = _memberrequest.Count();

            Assert.IsTrue(ct == 1);
        }
        public IActionResult Add([FromBody] MemberViewModel mvm)
        {
            if ((ModelState.IsValid) && (mvm != null))
            {
                // create a new Item with the client-sent json data
                var      item    = _objectmapper.Map <MemberViewModel>(mvm);
                DateTime dtLocal = mvm.DateOfBirth.ToLocalTime();

                // add the new item
                _memberrequest.AddNewMemberEntry(
                    mvm.FirstName,
                    mvm.LastName,
                    mvm.EmailAddress,
                    mvm.ContactNumber,
                    dtLocal,
                    mvm.AccountStatus
                    );

                // return the newly-created Item to the client.
                return(new JsonResult(_objectmapper.Map <MemberViewModel>(mvm), DefaultJsonSettings));
            }

            // return a generic HTTP Status 500 (Not Found) if the client payload is invalid.
            return(new StatusCodeResult(500));
        }