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