Пример #1
0
 public static EntityType CreateEntityTypeFrom(UpdateEntityTypeCommand cmd)
 => new EntityType
 {
     Id   = cmd.Id,
     Name = cmd.Name,
     SupportedDocuments = cmd.SupportedDocumentTypesIds
                          .Select(id => new EntityTypeDocumentType {
         DocumentTypeId = id
     }).ToList()
 };
Пример #2
0
 public IActionResult Put([FromBody] UpdateEntityTypeCommand msg)
 => updateCommand.Execute(msg).Match(
     Succ: x => x.Match <IActionResult>(Ok, BadRequest),
     Fail: ex => StatusCode(500, ex));