Beispiel #1
0
    public async Task <OperationalResult> AddAsync(Operational <BookModel> operational, CancellationToken cancellationToken = default)
    {
        var model = operational.Parameter;

        var entity = _mapper.Map <BookModel, Book>(model);

        var result = await _bookStore.AddAsync(entity, cancellationToken);

        return(result ? OperationalResult.Ok() : OperationalResult.Failed(""));
    }