Beispiel #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)));
        }
Beispiel #2
0
 public IActionResult CreateBlock([FromBody] CreateBlockModel blockModel)
 {
     _blockService.CreateBlock(blockModel);
     return(Ok());
 }
Beispiel #3
0
 public async Task <Response> CreateBlock([FromForm] CreateBlockViewModel model)
 {
     return(await _blockService.CreateBlock(model));
 }