Beispiel #1
0
 public static DocumentNumberSequence FromDto(NumberSequenceDto dto)
 => new DocumentNumberSequence(new Name(dto.Name),
                               dto.Prefix,
                               dto.InitialSequence,
                               dto.NextSequence,
                               dto.FinalSequence,
                               dto.ValidUntil,
                               dto.Created,
                               dto.Status);
Beispiel #2
0
 public ActionResult UpdateNumberSequence(long id, NumberSequenceDto sequenceDto)
 => _sequenceHandler
 .Update(id, sequenceDto)
 .Match <ActionResult>(
     Left: err => BadRequest(err.Message),
     Right: c => Ok(sequenceDto));
Beispiel #3
0
 public ActionResult CreateNumberSequence(NumberSequenceDto sequenceDto)
 => _sequenceHandler
 .Create(sequenceDto)
 .Match <ActionResult>(
     Left: err => BadRequest(err.Message),
     Right: c => Ok(c));