示例#1
0
        public void OK()
        {
            #region - code -

            var network = new LocalNetwork()
            {
                sqlServer = connStr
            };
            var repo = new FakeRepo_User();

            var srv = new SrvOnboardingV1(repo)
            {
                _sendEmail = false
            };

            if (!srv.Exec(network, new DtoOnboarding
            {
                sEmail = "*****@*****.**",
                sID = "102030405060",
                sName = "One",
                sPass = "******",
                _language = 0
            }))
            {
                Assert.Fail();
            }

            #endregion
        }
        public ActionResult Post([FromBody] DtoOnboarding obj)
        {
            var repo = new DapperUserRepository();
            var srv  = new SrvOnboardingV1(repo);

            if (!srv.Exec(network, obj))
            {
                return(BadRequest(srv.Error));
            }

            return(Ok(new { }));
        }