Exemple #1
0
        public async Task <IActionResult> Post([FromBody] PostConector body)
        {
            using (var db = new AppDb())
            {
                await db.Connection.OpenAsync();

                body.Db = db;
                var result = await body.ExcuteAsync();

                return(new OkObjectResult(result));
            }
        }
Exemple #2
0
        public async Task <IActionResult> GetNewsItem()
        {
            using (var db = new AppDb())
            {
                await db.Connection.OpenAsync();

                PostConector postConector = new PostConector(db);
                postConector.operationName = "NewsItemPost";
                postConector.operateType   = "SelectAll";
                var result = await postConector.ExcuteAsync();

                return(new OkObjectResult(result));
            }
        }