示例#1
0
        public ActionResult CreateBlock(Block block)
        {
            if (!ModelState.IsValid)
            {
                return(Json(new ResultModel(false, block)));
            }
            int id = _blockService.CreateBlock(block);

            return(Json(new ResultModel(true, id)));
        }
示例#2
0
 public IActionResult CreateBlock([FromBody] CreateBlockModel blockModel)
 {
     _blockService.CreateBlock(blockModel);
     return(Ok());
 }
示例#3
0
 public async Task <Response> CreateBlock([FromForm] CreateBlockViewModel model)
 {
     return(await _blockService.CreateBlock(model));
 }