Exemplo n.º 1
0
 public static AnnotationType ToAnnotationType(this CreateAnnotationTypeCommand cmd)
 => new AnnotationType
 {
     Name = cmd.Name,
     Root = cmd.Root
 };
 public IActionResult Post([FromBody] CreateAnnotationTypeCommand cmd)
 => createCommand.Execute(cmd).Match(
     Succ: x => x.Match <IActionResult>(Ok, BadRequest),
     Fail: ex => StatusCode(500, ex));