Esempio n. 1
0
    public virtual async Task Test003(Business.Auth.Token token, Arg <Test001> arg, [Ignore(IgnoreMode.BusinessArg)][Test2] decimal mm = 0.0234m)
    {
        dynamic args = new System.Dynamic.ExpandoObject();

        args.token = token;
        args.arg   = arg.Out;
        if (arg.Out.B == "ex")
        {
            throw new System.Exception("Method exception!");
        }
    }
Esempio n. 2
0
    public virtual async Task <dynamic> Test001(Business.Auth.Token token, Arg <Test001> arg, [Ignore(IgnoreMode.BusinessArg)][Test2] decimal mm = 0.0234m)
    {
        Context.DataBase.DB.Save(new DataModel.dd {
            dd2 = "111", dd_Column = "222"
        });

        using (var con = Context.DataBase.DB.GetConnection())
        {
            con.BeginTransaction();

            con.Save(new DataModel.dd {
                dd2 = "111", dd_Column = "222"
            });
            var data2 = con.Execute <DataModel.dd>("SELECT * FROM dd");

            var query = con.dd.Where(c => c.dd2 == "eee2");
            var data  = query.ToList();

            var query2 = con.dd.Where(c => c.dd2 == "eee2").Set(c => c.dd2, "333");
            query2.Update();

            con.Commit();
        }


        dynamic args = new System.Dynamic.ExpandoObject();

        args.token = token;
        args.arg   = arg.Out;
        if (arg.Out.B == "ex")
        {
            throw new System.Exception("Method exception!");
        }

        var exit = await RedisHelper.HExistsAsync("Role", "value2");

        if (exit)
        {
            arg.Out.B = await RedisHelper.HGetAsync("Role", "value2");
        }

        return(this.ResultCreate(args));
    }
Esempio n. 3
0
    public virtual async Task <dynamic> TestAgs001(BusinessController control, Arg <Ags2> a, decimal mm = 0.0234m, [FileCheck] Arg <List <Files>, BusinessController> ss = default, Business.Auth.Token token = default)
    {
        return(this.ResultCreate(a.In));

        return(this.ResultCreate(new { a = a.In, Remote = string.Format("{0}:{1}", control.HttpContext.Connection.RemoteIpAddress.ToString(), control.HttpContext.Connection.RemotePort), control.Request.Cookies }));

        return(control.Redirect("https://www.github.com"));
    }